I do not put the code here, but you can easily find it.
Immediately after installation, use the default action to start the service, if you do not have any user interface, then create an action without any interface (without setContentView) and start the service in its onCreate.
broadcastReceived, ACTION_BOOT_COMPLETED Service Manager. .
, .