Android-USB Connectivity
I'm in the middle of an android app that need to check whether the device is connected to another system or pendrive through usb and if it is connected i need to send a copy of my database file through usb port. This sis for backing up my database. I have no idea how to prompt for usb connections. I searched the net. But no results开发者_如何转开发!.Can anyone please help. Because i'm stuck here at my project.
Thanks in advance.
Not all devices have USB hardware that supports host mode, and there is no support in the Android API for using it that way.
Your best bet would be to write the files you wish to transfer to external storage and have the host locate and copy them when your device is connected.
精彩评论