lockscreen

Detect when screen is locked UWP

痞子三分冷 提交于 2021-02-20 05:18:33
问题 How can I detect if the screen is locked in UWP apps? When screen is locked, suspension of app occurs and I need to put some different code in case of locking screen. 回答1: You will find your answer here: https://developerinsider.co/prevent-the-screen-from-locking-on-uwp/ For those that are not looking for a link to another post that could, or could not, potentially be helpful here is the summary The code you would use is var displayRequest = new DisplayRequest(); displayRequest.RequestActive(

In Android 10 devices, Biometric prompt is failing with ERROR_CANCELED all the time on top of lock screen

試著忘記壹切 提交于 2021-02-18 07:57:49
问题 In Android 10 devices, Biometric prompt is failing with BiometricPrompt.ERROR_CANCELED all the time on top of the lock screen. Error is returned in onAuthenticationError callback of BiometricPrompt.AuthenticationCallback class. The biometric prompt authentication is working when the device is unlocked. is it possible to have biometric prompt authentication done on top of device lock screen in Android 10 when setDeviceCredentialAllowed is set to true? Update: The issue is only when

visibilitychange in mobile safari standalone mode

谁都会走 提交于 2021-01-28 09:05:03
问题 The Visibility API doesn't work in standalone mode on iOS. I need to know if the phone was unlocked with my app in the foreground so that I can check for an update, but nothing seems to work. I don't get the visibilitychange event. document.hidden is false, and document.visibilityState is "visible" when the phone is locked. I've also found that timers like setTimeout and requestAnimationFrame continue to function while the screen is locked, so I can't use the hacks I've found to detect that