Programming for android: Registering ACTION_BOOT_COMPLETED programmatically on newest questions tagged android – Stack Overflow

OK so I have searched and searched, but can’t seem to find a reference that declares that this shouldn’t be possible. Basically what I want to accomplish in my app is to allow the user to register or unregister the broadcast receiver for ACTION_BOOT_COMPLETED.

I try registering it using the code below, but no dice. If I add it to the manifest then I can recieve the events, but with no way to turn it off (from what I can tell). Is there no way to register and unregister a receiver for ACTION_BOOT_COMPLETED?

    IntentFilter bootFilter = new IntentFilter(Intent.ACTION_BOOT_COMPLETED);
    mBootCompleted = new BootBroadcastReceiver();
    registerReceiver(mBootCompleted, bootFilter);

See Answers


source: http://stackoverflow.com/questions/10572487/registering-action-boot-completed-programmatically
Programming for android: programming-for-android



online applications demo