Android Question can't brighten screen after dimming with keepalive(false)

RichyK68

Active Member
Licensed User
Longtime User
Hi,

I have an activity that does a phone.KeepAlive(False) on the Resume and a phone.ReleaseKeepAlive on the Pause. While the activity is active, and the screen is dimmed, I need to show stuff on the screen from time to time and bring the user's attention to it. I thought a phone.KeepAlive(true) would brighten the screen but it doesn't. I've also tried SetScreenBrightness(1) but that does nothing either.

If I ReleaseKeepAlive then immediately perform a KeepAlive(true) it sort of works, but the device shuts off momentarily before coming back bright and, frankly, looks really dodgy. Is there anyway of simply brightening the screen while keeping the KeepAlive lock in place (without having to release it then re-acquire it)?

Thanks in advance,

Richard
 

RichyK68

Active Member
Licensed User
Longtime User
Thank you, I don't know why I didn't think of that myself! :) So I simply made a timer that, after 15 seconds, sets the screen to dim.
 
Upvote 0
Top