Actually i have an android app that send some data via FTP, now i should add the possibility of passing that data even via USB if there is no available network.
So i'm going to use getExternalStorageDirectory method to do this but before i would check if the device is connected via USB so i'd display just in this case the button to load data to the PC. How could i check if the device is connected to a PC?