Thanks for the reply,
I created a service with the option "start at boot" and everything works.
I would like to turn on and off "start at boot" programmatically through code.
When you check "start at boot" you are actually intercepting the boot event. You can check the intent in Service_Start. The action will be: android.intent.action.BOOT_COMPLETED