I have been around browsing tutorials for android power button mods, I have a couple of questions in this regard Those being:
- How do I set a specific timer to make my app run after the button as been depressed for say 5 seconds.
- How do I make my app run at start up.
The basic premise of it being a personal security app(So you are not thinking I am doing anything stupid with it.). I am trying to give it easy access as well as quick functionality.
Any tips would be wonderful.
-Thanks.
This is not supported.
If your “app” has a UI that is supposed to “run at start up”, make it be the home screen.
If, instead, you are trying to do something else (e.g., schedule
AlarmManagerevents), register aBroadcastReceiverfor theBOOT_COMPLETEDaction in the manifest, and have theRECEIVE_BOOT_COMPLETEDpermission.