I am creating a system app that open when first boot is complated. how can i start this app automatically ? i have the stock rom. is there a file for autostarting apps ?
Asked
Active
Viewed 991 times
0
-
check this https://stackoverflow.com/questions/6391902/how-do-i-start-my-app-on-startup – Azhagthott Feb 13 '20 at 10:51
-
I did this but it does not work on android 9. only works on old versions. – sabrey Feb 13 '20 at 10:58
-
Ahh yes is true, are you working with rooted devices? – Azhagthott Feb 13 '20 at 11:01
-
unfortuanality no , this update will realise for products so it needs work without root. – sabrey Feb 13 '20 at 11:38
-
you can use the broadcast receiver. – Bharat Vankar Feb 13 '20 at 13:07
1 Answers
1
You could do this in several ways:
- Have your app act as launcher ( set launcher declarations in manifest and set it as default launcher)
- Modify your default launcher (e.g. Launcher3) to start the app when the launcher starts.
- Modify SystemUI app to start your app when it first starts.
- Modify SystemServer or one of the system services ( e.g. ActivityManagerService ) to start your app when the correct boot phase is reached (e.g. PHASE_BOOT_COMPLETED )

Rick Sanchez
- 4,528
- 2
- 27
- 53
-
thank you. this helped me a lot. does modifying system server breaks gsm certification rules ? – sabrey Feb 23 '20 at 21:53