Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Biometric Prompt
Search
Hiroshi Hashimoto
June 13, 2018
Technology
430
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Biometric Prompt
Hiroshi Hashimoto
June 13, 2018
More Decks by Hiroshi Hashimoto
See All by Hiroshi Hashimoto
What's new in Android
hi6484
1
1.5k
メルカリアッテをRxjava2に 載せ換えて。。
hi6484
0
1.7k
Google I/O Extended Tokyo 2017
hi6484
0
240
ヌガー対応 potatotios #33
hi6484
0
77
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Fabricをフル活用する AI Agent Hub -製造業特化AIエージェントの設計
iotcomjpadmin
0
150
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
200
toB プロダクトから見たWAF
tokai235
0
250
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
280
5分でわかる Amazon Connect_20260608
hwangbyeonghun
0
130
AI Agentをシステムに組み込む前にゆるく向き合ってみる
hayama17
0
170
#エンジニアBooks 30分でわかる 「技術記事を書く技術」 / engineer-books 2026-06-30
jnchito
1
130
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
370
ご挨拶「10周年を迎える共創ラボのこれまでとこれから」
iotcomjpadmin
0
150
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
1
900
元・セキュリティ学習経験0大学生による業務紹介 / An Introduction to the Job by a Former College Student with Zero Security Training Experience
nttcom
0
940
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
300
The Language of Interfaces
destraynor
162
27k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
Accessibility Awareness
sabderemane
1
140
Writing Fast Ruby
sferik
630
63k
The Spectacular Lies of Maps
axbom
PRO
1
820
Optimizing for Happiness
mojombo
378
71k
Faster Mobile Websites
deanohume
310
32k
How to make the Groovebox
asonas
2
2.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
550
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
240
Design in an AI World
tapps
1
250
Transcript
Biometric Prompt 〜Google I/O 2018 わいわい報告会 in 福岡~ Hiroshi Hashimoto
@hi6484 株式会社メルペイ
自己紹介 Hiroshi Hashimoto @hi6484 株式会社メルペイ Android Developer
Biometric Prompt
Biometric Prompt Andorid P(API:28)から Fingerprint Managerが非推奨となり Biometric Promptへ
FingerPrint Manager
Fingerprint Manager <uses-permission android:name="android.permission.USE_FINGERPRINT" />
Fingerprint Manager val fingerprintManager = getSystemService(Context.FINGERPRINT_SERVICE) as FingerprintManager //Fingerprintが搭載端末且つ登録済み if
(manager.isHardwareDetected and fingerprintManager.hasEnrolledFingerprints()) { //認証処理 }
Fingerprint Manager fingerprintManager.authenticate( cryptoObject, cancellationSignal, flags, authenticationCallback, Handler())
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) } }
Fingerprint Manager ・実装は簡単 ・Fingerprintのみ! ・認証するためのダイアログは各アプリで。
Biometric Prompt
Biometric Prompt <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
Biometric Prompt <uses-permission android:name="android.permission.USE_BIOMETRIC"/> <uses-permission android:name="android.permission.USE_FINGERPRINT"/> Fingerprint Manager
Biometric Prompt if (packageManager.hasSystemFeature( PackageManager.FEATURE_FINGERPRINT)) { //認証処理 }
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
Biometric Prompt biometricPrompt = BiometricPrompt.Builder(this) .setTitle("タイトル") .setSubtitle("サブ タイトル") .setDescription("指紋認証をお願いします") .setNegativeButton("キャンセル",
mainExecutor, DialogInterface.OnClickListener {dialogInterface, i -> }) .build()
Biometric Prompt biometricPrompt.authenticate( cryptoObject, cancellationSignal, mainExecutor, authenticationCallback) biometricPrompt.authenticate( cancellationSignal, mainExecutor,
authenticationCallback)
Biometric Prompt biometricPrompt.authenticate( cancellationSignal, mainExecutor, authenticationCallback) fingerprintManager.authenticate( cryptoObject, cancellationSignal, flags,
authenticationCallback, Handler()) Fingerprint Manager
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()
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
Biometric Prompt ・実装は簡単 ・Fingerprint以外もできるはず! ・認証するためのダイアログは共通になる!!!
Demo
Biometric Prompt けど、 APIレベルは 28以上!!
Biometric Prompt ・P以上はBiometricPromptを使う (使った方が楽) ・M以上N以下はFingerprintManager ・M以上N以下は頑張ってDialogを実装する
Biometric Prompt あとは、 Fingerprint以外の認証方法ができるのを 待つのみ
ご静聴ありがとうございました。