I am creating small initialization application. Let's call it InitApp
. That application is responsible for initialization Wifi connection and update/download another application from server. The InitApp
should run automatically every time after system boot successfully and it should go throw all steps (init wifi etc).
Initialization wifi connection and update another application from server works properly. Problem is with starting application on boot completed. (I don't want to use BroadcastReceiver
, because it requires that application must be run at least once.). I have rooted device and InitApp
will be pre-installed. So If I got rooted device with clean custom ROM where InitApp
has already installed as system app it should start automatically after boot completed. This is my goal.
As a super user I get access to system files. I am thinking about changing system configuration and add the command am start -n com.my.package/.MainActivity
. But I don't how. Which file can I modify and add this command?