Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting an apk on boot in Android

Tags:

android

Is there a way to start an Android application on boot? Perhaps by adding something to the init.rc script?

like image 661
Tony Avatar asked Nov 05 '22 17:11

Tony


1 Answers

If by "Android application", you mean something with a user interface, make it the home screen.

If by "Android application", you mean you have a small hunk of code you want to run around the time of boot, set up a BroadcastListener for the BOOT_COMPLETED broadcast.

You would only manipulate init.rc if you are doing things like creating custom firmware.

like image 145
CommonsWare Avatar answered Nov 14 '22 20:11

CommonsWare