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
81
Other Decks in Technology
See All in Technology
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
1
600
AIに書かせて、プラットフォームで縛る ― EKSプラットフォームで実践した責任境界と権限設計
elmodev09
0
830
AIエージェントを安全で速い現場監督にする:Jev・Obsidian・メタハーネス
x5gtrn
PRO
0
130
AWS App Runnerから Cloudflare Workersへ移行した話
ryota09
0
110
CI/CDではもう遅い - 人とAIが迂回しないDevSecOps Verify基盤の再設計 -
kintotechdev
1
340
特殊変数大全
dak2
0
150
Argo CDとAtlantisで実現するインフラ管理のセルフサービス化──小規模SREチームで支えるプラットフォーム
cassius7
0
190
AIは推し活である。
kurazuuuuuu
2
990
ScotSecure West 2026 - Glasgow
raybugg
0
190
AWS FinOps Agent 結局何が得意なの?
siromi
0
210
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
100
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
580
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
920
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Prompt Engineering for Job Search
mfonobong
0
460
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The browser strikes back
jonoalderson
0
1.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Limits of Empathy - UXLibs8
cassininazir
1
690
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以外の認証方法ができるのを 待つのみ
ご静聴ありがとうございました。