Ciao, sto facendo un app di monitoraggio dati.
Mi occorrerebbe di mantenere lo schermo dello smartphone o tablet, acceso e attivo mentre e in funzione l'app.
Ce modo di evitare che lo schermo si spenga ad app in funzione ?
Altre modalità per mantenere "acceso" lo schermo le trovi leggendo questo thread su stackoverflow
Per attivare il WakeLock da codice:
B4X:
Dim wake As PhoneWakeState 'ignore. this will add the required permission
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim WakeLock As JavaObject
WakeLock = ctxt.RunMethodJO("getSystemService", Array("power")).RunMethod("newWakeLock", Array(1, "LocationManagerService"))
WakeLock.RunMethod("acquire", Null)