On Mon, Sep 26, 2011 at 6:55 AM, Michal Maruska <[email protected]> wrote:
> I have noticed, that some intents, eg.  BOOT_COMPLETED or
> ACTION_SCREEN_{ON,OFF} are impossible to register for from
> the AndroidManifest.xml. I  would like to find the documentation
> listing such intents

I am not aware of any such documentation. Note that
ACTION_BOOT_COMPLETED probably *could* be registered via
registerReceiver(), but doing so would be pointless. By the time any
code got a chance to call registerReceiver(), the boot will have
already occurred.

> and would like to understand why is that.

They do not want to fork a whole bunch of processes at those points in
time. For example, ACTION_BATTERY_CHANGED can only be used via
registerReceiver(), because they don't want to run the risk of having
to fire off a bunch of processes every time the battery state changes
by a bit.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to