I test my app in HTC GPhone Dream.

SystemProperties.get("status.battery.level_raw") will return null.

So I use a receiver to receive Intent.ACTION_BATTERY_CHANGED and good
news is each time when my app starts, the receiver will receive the
intent instantly. So we can get battery level at the first time.

On Sep 12, 1:14 am, Alex Tang <[email protected]> wrote:
> Emulator can run, i will try it in real device.
>
> On Sep 12, 12:53 am, Dianne Hackborn <[email protected]> wrote:
>
>
>
> > On Fri, Sep 11, 2009 at 9:10 AM, Alex Tang <[email protected]> wrote:
> > > SystemProperties.get("status.battery.level_raw")
> > > can getbatterystatus instantly! Like typing #getprop
> > > status.battery.level_raw in adb shell
>
> > Don't do that.  It is not part of the SDK, and your app will break.
>
> > --
> > 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.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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