Please consider using this so you don't get run every time the battery level
changes:

http://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_POWER_CONNECTED

On Mon, Mar 8, 2010 at 10:21 AM, Mark Murphy <[email protected]>wrote:

> Paul wrote:
> > What is the event that tells me when the Android device is hooked up
> > to a power plug?
>
> ACTION_BATTERY_CHANGED -- the extras will tell you the charging state
> (AC, USB, not plugged in, etc.).
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.0
> Available!
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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