Hi
I've project in which Arduino Mega is connected to Android tablet using OTG cable. Android application is started when Arduino is connected to tablet (uses intent filter like this):
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
Problem occurs when i disconnect and reconnect Arduino to tablet, when application is running. USB device disconnection and connection is detected by USB device manager in Android, has appropriate permissions, but communication is not working. I've got some logging features on Arduino side and it seems, that it is not started after reconnection, setup() function is not called (hardware reset also does not help), however Arduino seems to be powered up. Anyone has similar problem? Is this some problem with hardware setup?
BR, Robert