Phillrb Posted June 8, 2021 Share Posted June 8, 2021 There's a requirement in our product to have the user set a device PIN. Sadly, redirecting the user to the Android Set Device PIN screen is inconsistent and broken. In Android, you can test for device PIN / password using: Quote KeyguardManager keyguardManager = (KeyguardManager) unityActivityContext.getSystemService(Context.KEYGUARD_SERVICE); bool isSet = keyguardManager.isKeyguardSecure(); You can then redirect the user to set a device PIN using: Quote Intent pinSetIntent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD); pinSetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); activity.startActivity(pinSetIntent); We are experiencing the following issues: sometimes keyboard does not show to allow user to enter PIN sometimes a black screen is shown instead of the settings screen if user already has a device PIN set, PIN cannot be changed as there is a crash after entering the current PIN to authorize the change sometimes nothing happens at all Can a member of VIVE support please: confirm the recommended way for an app to enforce a device PIN be set? confirm how to reliably redirect users to the 'Set device PIN' screen? Thanks! @Corvus @Tony PH Lin @Dario Link to comment Share on other sites More sharing options...
HackPerception Posted June 8, 2021 Share Posted June 8, 2021 @phibbs What device are you working on? Focus Plus? Link to comment Share on other sites More sharing options...
Phillrb Posted June 9, 2021 Author Share Posted June 9, 2021 This is on the VIVE Focus Plus. Link to comment Share on other sites More sharing options...
Phillrb Posted June 17, 2021 Author Share Posted June 17, 2021 @HackPerception how is an app meant to direct or enforce the user set a device PIN? Are the standard Android APIs meant to be used or is there an alternative? These are the steps a user can take to achieve it manually; but it'd be great if we could direct users there programmatically and check that the outcome is as required (PIN has been set): https://www.vive.com/us/support/vive-focus/category_howto/securing-the-headset-with-a-pin.html Thanks @Tony PH Lin Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now