F FFMan Member Licensed User Longtime User Sep 17, 2012 #1 My app sets screen brightness to max and turns off the screen saver. How do i know when to reset these to default as it seems the app doesn't actually die until android feels it should. this is annoying as it leaves the screen on etc as this app has a specific purpose, can i close it when i'm done with it and reset the screen ? i know its not best practice but is there a better way ? thanks
My app sets screen brightness to max and turns off the screen saver. How do i know when to reset these to default as it seems the app doesn't actually die until android feels it should. this is annoying as it leaves the screen on etc as this app has a specific purpose, can i close it when i'm done with it and reset the screen ? i know its not best practice but is there a better way ? thanks
margret Well-Known Member Licensed User Longtime User Sep 17, 2012 #2 If you are using the phone lib to set brightness, the OS should return to the brightness settings you had previous to loading your app. With the phone lib this brightness setting is just for your app. Upvote 0
If you are using the phone lib to set brightness, the OS should return to the brightness settings you had previous to loading your app. With the phone lib this brightness setting is just for your app.
F FFMan Member Licensed User Longtime User Sep 17, 2012 #3 brightness may work like that but this doesn't appear to:- PhoneWakeStateLib.KeepAlive(True) the phone stays on and doesn't timeout Upvote 0
brightness may work like that but this doesn't appear to:- PhoneWakeStateLib.KeepAlive(True) the phone stays on and doesn't timeout
margret Well-Known Member Licensed User Longtime User Sep 17, 2012 #4 In a few of my app I set the brightness. When I am ready to exit the app, like in my movie player, I use: Code: Copy vv.Stop vv.RemoveView awake.ReleaseKeepAlive Activity.Finish This code works fine. You can have the movie set very bright and when you exit, you can see the screen go back down in brightness to the setting before the app was started. Are you releasing the keepalive? Upvote 0
In a few of my app I set the brightness. When I am ready to exit the app, like in my movie player, I use: Code: Copy vv.Stop vv.RemoveView awake.ReleaseKeepAlive Activity.Finish This code works fine. You can have the movie set very bright and when you exit, you can see the screen go back down in brightness to the setting before the app was started. Are you releasing the keepalive?
F FFMan Member Licensed User Longtime User Sep 17, 2012 #5 thanks i'll try that - seems like the right approach here Upvote 0
F FFMan Member Licensed User Longtime User Sep 18, 2012 #6 being a bit of a newbie, what does vv. and awake. refer to. should awake to be dimmed as PhoneWakeStateLib is vv the activity ? Upvote 0
being a bit of a newbie, what does vv. and awake. refer to. should awake to be dimmed as PhoneWakeStateLib is vv the activity ?
margret Well-Known Member Licensed User Longtime User Sep 18, 2012 #7 Here is the full Dim statements used: Code: Copy Dim awake As PhoneWakeState Dim vv As VideoView Upvote 0