I currently have a Nexus One that I have communicating with Linux using the Android USB Open Accessory library. I have built a Linux application that I am able to send commands to an Android client application to perform tasks.
The problem I have is whenever the activity changes on the Nexus device I lose connection to the device. For example, if I send a dial command to Android from Linux the phone will call the Android dialer and make the call. After coming back from the call though, my Android application acts as if the USB cable is disconnected and I am no longer able to send it commands from Linux. I experience the same issue if, while in the Android application, I press the home button and then relaunch the client application.
Any ideas?
On the Nexus device have the Open Accessory connection run in a service.
That way the connection won’t be killed when the activity is destroyed.