Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Biometric Prompt

Biometric Prompt

Hiroshi Hashimoto

June 13, 2018
Tweet

More Decks by Hiroshi Hashimoto

Other Decks in Technology

Transcript

  1. Fingerprint Manager object : FingerprintManager.AuthenticationCallback() { override fun onAuthenticationError(errorCode: Int,

    errString: CharSequence?) { super.onAuthenticationError(errorCode, errString) } override fun onAuthenticationSucceeded(result: FingerprintManager.AuthenticationResult?) { super.onAuthenticationSucceeded(result) } override fun onAuthenticationFailed() { super.onAuthenticationFailed() } override fun onAuthenticationHelp(helpCode: Int, helpString: CharSequence?) { super.onAuthenticationHelp(helpCode, helpString) } }
  2. Biometric Prompt if (packageManager.hasSystemFeature( PackageManager.FEATURE_FINGERPRINT)) { //認証処理 } val manager

    = getSystemService(Context.FINGERPRINT_SERVICE) as FingerprintManager //Fingerprintが搭載端末且つ登録済み if (manager.isHardwareDetected and fingerprintManager.hasEnrolledFingerprints()) { //認証処理 } Fingerprint Manager
  3. Biometric Prompt object : BiometricPrompt.AuthenticationCallback() { override fun onAuthenticationError(errorCode: Int,

    errString: CharSequence) { super.onAuthenticationError(errorCode, errString) } override fun onAuthenticationHelp(helpCode: Int, helpString: CharSequence) { super.onAuthenticationHelp(helpCode, helpString) } override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { super.onAuthenticationSucceeded(result) } override fun onAuthenticationFailed() { super.onAuthenticationFailed()
  4. Biometric Prompt object : BiometricPrompt.AuthenticationCallback() { override fun onAuthenticationError(errorCode: Int,

    errString: CharSequence) { } override fun onAuthenticationHelp(helpCode: Int, helpString: CharSequence) { } override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { } override fun onAuthenticationFailed() { object : FingerprintManager.AuthenticationCallback() { override fun onAuthenticationError(errorCode: Int, errString: CharSequence?) { } override fun onAuthenticationHelp(helpCode: Int, helpString: CharSequence?) { } override fun onAuthenticationSucceeded(result: FingerprintManager.AuthenticationResult?) { } override fun onAuthenticationFailed() { } } Fingerprint Manager