Hello community,
apparently, there is difference between turn on device, and unlock device.
This code:
correctly catches status, when I turn device ON. It has status BEFORE unlock the screen, no matter, if biometric, PIN, or pattern. Usually, if I do nothing, device will go to OFF status in 5 seconds.
However, when I unlock the device, there is no other event happening. Unlock device means device to be able to use.
There is NO event in phone library (or I can't find it), when device is really unlocked and ready to use. Can anybody help me with this?
There are three statuses:
- device OFF
- device turned ON
- device UNLOCKED
I can catch device OFF (works nicely):
I can catch device ON (also works nicely):
But I can't catch device UNLOCKED
Please, help me with this.
Thanks.
apparently, there is difference between turn on device, and unlock device.
This code:
B4X:
Sub Process_Globals
Dim mPhone As Phone
Dim mPhoneEvents As PhoneEvents
End Sub
Sub Service_Create
Dim pID As PhoneId
mPhoneEvents.InitializeWithPhoneState("PE", pID)
End Sub
Sub PE_ScreenOn(Intent As Intent)
LogColor("SCREEN ON", Colors.Red)
End Sub
correctly catches status, when I turn device ON. It has status BEFORE unlock the screen, no matter, if biometric, PIN, or pattern. Usually, if I do nothing, device will go to OFF status in 5 seconds.
However, when I unlock the device, there is no other event happening. Unlock device means device to be able to use.
There is NO event in phone library (or I can't find it), when device is really unlocked and ready to use. Can anybody help me with this?
There are three statuses:
- device OFF
- device turned ON
- device UNLOCKED
I can catch device OFF (works nicely):
B4X:
Sub PE_ScreenOff(Intent As Intent)
LogColor("SCREEN OFF", Colors.Red)
End Sub
I can catch device ON (also works nicely):
B4X:
Sub PE_ScreenOn(Intent As Intent)
LogColor("SCREEN ON", Colors.Red)
End Sub
But I can't catch device UNLOCKED
Please, help me with this.
Thanks.