stefanoa Active Member Licensed User Longtime User May 31, 2013 #1 hi, there's a way to lock/unlock screen via code? thanks
walterf25 Expert Licensed User Longtime User May 31, 2013 #2 Unlock Screen If there's no password set you can use this, it works for me. B4X: Sub SetShowWhenLocked Dim r As Reflector r.Target = r.GetActivity r.Target = r.RunMethod("getWindow") r.RunMethod2("addFlags", 6815872, "java.lang.int") End Sub Hope it helps! Upvote 0
Unlock Screen If there's no password set you can use this, it works for me. B4X: Sub SetShowWhenLocked Dim r As Reflector r.Target = r.GetActivity r.Target = r.RunMethod("getWindow") r.RunMethod2("addFlags", 6815872, "java.lang.int") End Sub Hope it helps!
stefanoa Active Member Licensed User Longtime User Jun 1, 2013 #3 thanks but don't work for me.. (tablet Smarttab10 android 3.2.1) Upvote 0