Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Biometric Prompt
Search
Hiroshi Hashimoto
June 13, 2018
Technology
440
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.6k
メルカリアッテをRxjava2に 載せ換えて。。
hi6484
0
1.7k
Google I/O Extended Tokyo 2017
hi6484
0
240
ヌガー対応 potatotios #33
hi6484
0
83
Other Decks in Technology
See All in Technology
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
Local CI × GitHub Actions
gogutan
2
190
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
250
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
870
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
How to Design Configuration for Rails Applications
willnet
1
790
Classmethod Company Deck
satoshi7
1
690
AI時代のPRレビューにどう向き合うか?
kairim0
1
240
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Building the Perfect Custom Keyboard
takai
2
910
Embracing the Ebb and Flow
colly
88
5.2k
Faster Mobile Websites
deanohume
310
32k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Designing for Performance
lara
612
70k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Building AI with AI
inesmontani
PRO
1
1.3k
Claude Code のすすめ
schroneko
67
230k
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以外の認証方法ができるのを 待つのみ
ご静聴ありがとうございました。