I am developping an app which uses a OTG USB device.
The device I am using is a USB barcodescanner which is detected by android as a keyboard.
But I detected that every time I plug or unplug the OTG device, the App is restarted by calling the Activity onCreate() method.
This is causing me a lot of problems because I cannot detect why is the onCreate() method being called.
Is there any Intent or anything that could be fired and to be catched when the otg device is plugged / unplugged?
Thanks in advance.