Search code examples
androidbroadcastreceiver

BroadcastReceiver for Network State Changed not called when app isn't openen after installing


For my Android app I made a BroadcastReceiver which is triggered on CONNECTIVITY_CHANGE, defined in the AndroidManifest.xml. This works fine, except when you don't open the app after installation. In that case it looks like the BroadcastReceiver isn't registered yet. The same thing is happening for the BroadcastReceiver which is triggered on BOOT_COMPLETED.

Is it possible that the registering of the BroadcastReceivers according the Manifest only happens when the app is opened after installation?


Solution

  • I think I have the same problem as Android broadcast receiver not getting called immediately after install

    The best answer tells it isn't possible, and in the reply the asker refers to this app. But this app only works on Android 2.0 - 2.3. So this probably means that in newer Android version the BroadcastReceivers only register when app is opened once. If someone does have a workaround, I'd be happy to know. :)