> Searching old posts reveal that no one knows a way to get the current
> battery level without using intents. Is this true? There's no method
> to just return the current battery level?

Intents and "return the current battery level" are not mutually exclusive.

Call registerReceiver(null, new Intent(Intent.ACTION_BATTERY_CHANGED)),
and the return value will be an Intent with the current battery
information. ACTION_BATTERY_CHANGED is a so-called "sticky broadcast",
meaning the last-broadcast Intent of that action is available upon demand.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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