I am starting to use the Android USB API to send data from Arduino to an Android device. Can I programmatically switch between send and receive data and charge my Android phone?
I know that you cannot do both things at the same time, and since you need to open FileInputStream in order to be able to receive data while it is open, the device will not charge.
Will it be as simple as closing this stream to recharge it? If so simple, can the Arduino send basic information to ask the device to reopen the stream?
Thor
source share