Patent ID: 9639485
Date: 2017-05-02
CPC Classifications: G06F

Claim:
1. A method of transmitting data in an Android platform based terminal device comprising: when the terminal device establishes a connection for data transmission with another device over a Universal Serial Bus (USB), the terminal device transmitting data in an internal storage of the terminal device to the another device based upon a file transfer protocol and receiving and writing into the internal storage data transmitted from the another device based upon the file transfer protocol; and the terminal device transmitting data in an external storage of the terminal device to the another device in a USB Mass Storage (UMS) mode and receiving and writing into the external storage data transmitted from the another device in the UMS mode, wherein the terminal device transmitting data in the external storage of the terminal device to the another device in the UMS mode and receiving and writing into the external storage data transmitted from the another device in the UMS mode comprises: the terminal device unmounting the external storage over an Android platform and attaching the external storage to the another device as a USB mass storage device; and the terminal device transmitting data in the USB mass storage device to the another device in the UMS mode and receiving and writing into the USB mass storage device data transmitted from the another device in the UMS mode, and wherein the terminal device unmounting the external storage over the Android platform and attaching the external storage to the another device as the USB mass storage device comprises: the terminal device unmounting the external storage at an Android framework layer, setting the external storage as the USB mass storage device by invoking an enableUSBMassStorage function in a StorageManager class through a UsbDeviceManager class at the framework layer, and attaching the external storage to the another device in an external storage management process.