0

I'm writing an app that needs to start up automatically when a device is connected to a tablet in USB Host Mode. In addition to that I want my app to start on tablet reboot after boot_completed if the usb device is attached. Having need to implement these two functionalities I'm in a bit of a dead lock situation. It works all fine when I plug a usb device the app brings up itself without a problem. but on reboot i'm running in to an issue where the application starts itself before the boot_complete is recieved, and that is because the usb device is already attached to the tablet. This is made worse in kitkat 4.4.2 as they have delayed processing the boot_complete state by doing it serially where as 4.3 did it parallely on reboot.

So how can I get the app to start on reboot after bootup is completed rather than before boot_up is completed while having the USB device attached.

Many thanks

Mr.Noob
  • 1,005
  • 3
  • 24
  • 58
  • You may have to do both, and have some time-delayed decisioning logic before you decide to "do" anything. – Chris Stratton Mar 25 '14 at 15:00
  • My only issue is how to stop the app starting when the USB Device is connected on reboot? wondering if it could be done. – Mr.Noob Mar 25 '14 at 16:24
  • What about just having it decide that it was an inappropriate start, and so finish or fire a home intent, without actually displaying anything? – Chris Stratton Mar 25 '14 at 16:26

0 Answers0