B4J Question NoteBook Screen Turn Off

Douglas Farias

Expert
Licensed User
Longtime User
Hi all.
I m made a app of movies and series using b4j.
this is working fine
https://www.b4x.com/android/forum/threads/mega-play-beta.57119/

But on notebooks pcs, the screen turn off later a time, for example 15 min screen is black need move mouse to back, this is normal by windows energy.

how can i make to stay alive the screen of notebooks in b4j?
Like AsPhoneWakeState of b4a

thx
 

Daestrum

Expert
Licensed User
Longtime User
You could use FXRobot to fire a KeyEvent on a timer - just get it to send F16 key press every 10 minutes or so.
F16 shouldn't be used by anything, but will register as a key press and stop the screen going to sleep.
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
You can use the jAWTRobot library to move the mouse a tiny bit and then move it back to where it started every so often. The whole maneuver should take under a millisecond.
 
Upvote 0
Top