Hi group,
I'm wondering if there is more simple way to receive battery level
from code.
At the moment I'm using a BroadcastReceiver registered at the Context
with a IntentFilter on ACTION_BATTERY_CHANGED, all this made by code.
My AndroidManifest.xml do not specifies about other filter or
permission.
In this way I would like to receive this information at runtime, so I
thought a way is to send a broadcast like this:

sendBroadcast(new Intent(Intent.ACTION_BATTERY_CHANGED),
<some_permission>);

I know that this Intent action could be sent only by the system. But
there is some way by specifing a permission in code or using
AndroidManifest.xml to achieve what I want?

I want to have my Battery level in my code, or sending a broadcast
like ACTION_BATTERY_CHANGED, or in some other way.

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