Killing an application

FFMan

Member
Licensed User
Longtime User
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
 

FFMan

Member
Licensed User
Longtime User
brightness may work like that but this doesn't appear to:-

PhoneWakeStateLib.KeepAlive(True)

the phone stays on and doesn't timeout
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
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:

B4X:
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

FFMan

Member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…