Jump to content

Directing user to set device PIN broken


Recommended Posts

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:

  1. confirm the recommended way for an app to enforce a device PIN be set?
  2. confirm how to reliably redirect users to the 'Set device PIN' screen?

Thanks! @Corvus @Tony PH Lin @Dario

Link to post
Share on other sites

Please sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...