Android USB API: Switch between charge and data send
问题 I'm starting to use the Android USB API to send data from an Arduino to an Android device. Is it possible to programmatically switch between send/receive data and just charge the Android phone? I know that you cannot do both things at the same time, and, since you have to open a FileInputStream in order to be able to receive data, as long as this is open the device won't be charged. Will it be just as simple as closing this stream to charge again? If is as simple as it, can the Arduino then