I am not quite certain what the behavior of a BroadcastReceiver
, registered in the manifest and enabled via PackageManager
, is when the phone is asleep. The question arose because I need a receiver registered for broadcasts from WifiManager
<receiver
android:name=".receivers.ScanResultsReceiver"
android:enabled="false" >
<intent-filter>
<action android:name="android.net.wifi.SCAN_RESULTS" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
</intent-filter>
</receiver>
but what I want to know (as in links to the docs or some authoritative post in google groups) is which broadcasts are guaranteed to wake up a receiver when the phone has fallen asleep (as in left alone for quite some time) and keep the phone awake as long as onReceive()
runs (which of course should not be too long to avoid ANR).
The receiver might well be the only component of the app running
As a bonus, I recently learned that some intents, flagged with FLAG_RECEIVER_REGISTERED_ONLY
, are only delivered to dynamically registered Receivers - is there any place listing those intents ?