Android Question Delay Intent on boot.

markcasio

Member
Licensed User
Longtime User
Hi, when i reboot my android device the application starts too soon and crashed
This is because the usb intent is called before the launcher and other services.
Is there a way to delay this usb intent until boot is completed ?
When i remove this usb intent from the manifest , the application starts normal, but i get all the usb permission questions again.
B4X:
SetActivityAttribute(Main,android:directBootAware, "true")
CreateResource(xml, device_filter.xml,
<resources>
<usb-device vendor-id="1027" product-id="24577"/>
</resources>
)
AddActivityText(Main, <intent-filter>
  <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
    </intent-filter>
Regards,
 
Last edited:

markcasio

Member
Licensed User
Longtime User
Found it, it was hardware related , it has nothing to do with b4a.
A non-standard boot sequence caused this.

Thanks,
 
Upvote 0
Top