[android-developers] Re: Accessing System Brightness

2009-06-05 Thread Hiro
This is indeed frustrating. however, there's a funny new wrinkle whenever I use the new cupcake-approved sugar-free method, the brightness stays after I go back to the home screen. (yay) I seem to have problems when brightness gets too low though (IE, cant do anything with the unit ...

[android-developers] Re: Accessing System Brightness

2009-05-28 Thread Mark
It must still be possible in 1.5 cupcake: - PowerManager can set it - Settings - SoundDisplay - Brightness can change it - haven't checked Locale While the system setting might have privileged access to the API, the PowerManager is just a normal program. So how do they do it?

[android-developers] Re: Accessing System Brightness

2009-04-28 Thread Raphael
On Thu, Apr 23, 2009 at 9:34 PM, coredump jose.jun...@gmail.com wrote: So I tried the 'correct' way to do it: Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255); And it doesnt work. It seems to change the brightness value on the Display Settings Screen

[android-developers] Re: Accessing System Brightness

2009-04-27 Thread coredump
So I tried the 'correct' way to do it: Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255); And it doesnt work. It seems to change the brightness value on the Display Settings Screen but not the actual display brightness. I tried with putString too, no game. I

[android-developers] Re: Accessing System Brightness

2009-04-24 Thread guruk
hmm but i also dont like that so much. for example right now i was thinking to write a simple app just changing the brightness in a simple way. not just for a window, for the whole system. Often I am out and just like a simple change brightness, without searching through the setup (imagine i am

[android-developers] Re: Accessing System Brightness

2009-04-16 Thread Dianne Hackborn
// Make the screen full bright for this activity. WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = 1.0f; getWindow().setAttributes(lp); On Wed, Apr 15, 2009 at 10:21 PM, SR stan.r...@gmail.com wrote: Dianne, Would you mind

[android-developers] Re: Accessing System Brightness

2009-04-15 Thread SR
Dianne, Would you mind sharing a snippet of code on how to do this in Cupcake using the new API? Thanks! Stan On Apr 8, 3:49 pm, Dianne Hackborn hack...@android.com wrote: There is a new API to be able to force the screen brightness while your window is on-screen. On Wed, Apr 8, 2009 at

[android-developers] Re: Accessing System Brightness

2009-04-09 Thread Todd Sjolander
Ah, that makes sense. Thank you. On Apr 8, 4:45 pm, Dianne Hackborn hack...@android.com wrote: It will only modify the screen while that window/activity is being shown to the user.  This allows it to be done in a safe way (no permission required) which the system can recover from if there is

[android-developers] Re: Accessing System Brightness

2009-04-08 Thread Todd Sjolander
Dianne, Is there a new way to do this in Cupcake, or is the functionality being removed? On Mar 23, 1:37 pm, Dianne Hackborn hack...@android.com wrote: This is a private API and will break in Cupcake. -- Dianne Hackborn Android framework engineer hack...@android.com

[android-developers] Re: Accessing System Brightness

2009-04-08 Thread Dianne Hackborn
There is a new API to be able to force the screen brightness while your window is on-screen. On Wed, Apr 8, 2009 at 12:08 PM, Todd Sjolander guyfantas...@gmail.comwrote: Dianne, Is there a new way to do this in Cupcake, or is the functionality being removed? On Mar 23, 1:37 pm, Dianne

[android-developers] Re: Accessing System Brightness

2009-04-08 Thread Dianne Hackborn
It will only modify the screen while that window/activity is being shown to the user. This allows it to be done in a safe way (no permission required) which the system can recover from if there is a bug in the application (or if the application gets killed for some reason, as we tend to do). On

[android-developers] Re: Accessing System Brightness

2009-03-23 Thread Dianne Hackborn
On Sun, Mar 22, 2009 at 10:45 PM, joby joby...@gmail.com wrote: IHardwareService hardware = IHardwareService.Stub.asInterface ( ServiceManager.getService(hardware)); try { hardware.setScreenBacklight(150); } catch (RemoteException e) // TODO

[android-developers] Re: Accessing System Brightness

2009-03-22 Thread joby
i tried with the below code but its not effecting Settings.System.putInt(ftaContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, bright); but i got the screen brightness by the below code IHardwareService hardware = IHardwareService.Stub.asInterface (

[android-developers] Re: Accessing System Brightness

2009-03-21 Thread sm1
and to read it and log it: int ib = Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS,-1); Log.d(SCREEN_BRIGHTNESS (0-255) {+ib+}); On Mar 20, 6:53 pm, mark.ka...@gmail.com wrote: int bright = 50;

[android-developers] Re: Accessing System Brightness

2009-03-21 Thread sm1
make that Log.d(x...@#$% tag :-),SCREEN_BRIGHTNESS (0-255) {+ib+}); serge On Mar 21, 10:40 am, sm1 sergemas...@gmail.com wrote: and to read it and log it:     int ib = Settings.System.getInt(getContentResolver(),         Settings.System.SCREEN_BRIGHTNESS,-1);    

[android-developers] Re: Accessing System Brightness

2009-03-20 Thread mark . kahrl
int bright = 50; Settings.System.putInt(ftaContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, bright); On Mar 19, 9:14 pm, joby joby...@gmail.com wrote: Hi,       I want to use the system brightness  in android,anybody can give me a sample code of getting the brightness from