Created
September 26, 2018 23:02
-
-
Save adrianhall/a48253257732664cf9ab90003d4be9d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ask for permission to use the fingerprint scanner | |
if (fingerprintManager.isHardwareDetected) { | |
if (checkSelfPermission(Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) { | |
if (checkedPermissions) { | |
hasPermissions = false | |
} else { | |
requestPermissions(arrayOf(Manifest.permission.USE_FINGERPRINT), REQUEST_PERMISSIONS_FINGERPRINT) | |
} | |
} else { | |
hasPermissions = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment