Hi,

I am sorry that I do not know whether this topic should appear here.

I checked out the whole android open source project, and found the
source code under /frameworks/base/services/java/BatteryService.java
as well as the other service classes such as AlarmManagerService,
WindowManagerService,...
While in the android.content.Context#getSystemService(String name),
the available names do not contains BATTERY_SERVICE.
I want to know the reason. anybody knows that?
I wonder if I want to know the information of the current battery
status, such as scale, level, status, health,... which are defined
in /
frameworks/base/services/java/BatteryService.java, how should I
collect these information?

And I noticed that in the android application Settings, there is an
BatteryInfo activity, which can collect these information, while the
activity invokes a class named android.os.ServiceManager, while in the
sdk 1.5r1, there is no such class. I pulled all the related class out
to my workspace, and made it compiled without error, and ran the
application, it can display the right information(I just use the
emulator.).
I wonder if I can just do it this way, I mean if I am developing a
commercial application, is it ok?

Thanks in advance, I am so appreciated for you anwser or just hints.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to