I'm developing an Android app in Xamarin using AOA for communication with a single sensor. Basics are this:
- Plug in the sensor to the tablet. Sensor puts tablet in open accessory mode and launches the app.
- App main activity launches a background service with a single thread for comm.
- The thread's Run() method is a basic while loop that calls InputStream.Read() on the sensor.
- Comm is sampling at 10 Hz, roughly 60 bytes per sample, with the app always initiating the transaction (i.e. Write then Read).
- After about a minute, the Android GC kicks in and the OutputStream.Write() returns an error of "device not available". Subsequent InputStream.Read() operations fail too.
- Xamarin does not seem to allow me to attach the debugger to a running process over WiFi. I need this since the USB port is being used obviously for AOA. Am I missing something here, or does Xamarin just not support this?
Anyone out there tackled this beast and won, or battled something similar? Any help is appreciated.