can you explain how its done ?
Well, OK. Select the Reflection library. The sub bellow will set a variable - 'DeviceLocked' to either 0 or 1:I would like to know
Sub CheckLock as boolean
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "keyguard", "java.lang.String")
return r.RunMethod("inKeyguardRestrictedInputMode")
end sub
Thank you.
Don't take this the wrong way, I am just trying to teach you how to program faster/easier
B4X:Sub CheckLock as boolean Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod2("getSystemService", "keyguard", "java.lang.String") return r.RunMethod("inKeyguardRestrictedInputMode") end sub