Hello all,

  IN SHORT:
I need to get instance of PowerManagerService (in order to call its method 
isScreenBright). However I am unable to do it, after reading Android 
sources, the closest guess was to get it (via reflection) from 
android.os.ServiceManager by calling getService. The problem is the 
resulting class name is BinderProxy (the class name of the object which I 
get after actual invoke of getService), not PowerManagerService and I am 
stuck at this point. The types have to match in order to continue working 
with reflection invoking.

  BACKGROUND STORY (safe to skip it):
I try to read real brightness of the screen (not the one that should be 
set, but the real one). All top level brightness readers method return 
theoretical values (most likely -- from settings), so when phone lowers it 
automatically, those top level methods get the same result despite, the 
brightness changed. I figured out, I try isScreenBright method, it should 
tell me if phone is in normal brightness mode, or in power save mode 
(source code which sets this mode look promising anyway).

Thank you in advance.
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to