1

I have an app that currently requires a user to provide a PIN code upon opening, or to unlock the app using biometrics such as face recognition or fingerprint identification.

When the app receives a push notification on iOS, it seems quite redundant however to have the user unlock the phone with FaceId and then immediately require the user to do this again to enter the app and view the notification details.

The same would presumably hold true using TouchId or Android fingerprint identification.

Is there a reasonable way that I could detect that the device was biometrically unlocked, and thus skip the redundant pin/biometric check?

David
  • 261
  • 4
  • 4

1 Answers1

0

Reading through what you've written I had a thought in my mind: why exactly are you pivoting around biometric unlock? For your purposes, I guess, any kind of unlock will do. Give this thread a shot Android - detect phone unlock event, not screen on

jujka
  • 1,190
  • 13
  • 18
  • Thanks! That looks like it would solve the problem quite sufficiently on Android. The reason I was thinking just biometrics is that the app currently has its own PIN code, which is stored server-side and requires a network call to verify. It skips that however if biometric authentication is used in its own lock screen. It would however presumably be sufficient to use any unlocking system that the user has in place. – David Aug 22 '18 at 11:57
  • @David The only thing I would suggest is to store some kind of timestamp to make sure that screen has been just unlocked. Otherwise, if screen timeout is few hours, this potentially may be harmful. Anyway, good luck with that, your idea seems quite a handy one. Please consider marking my answer as accepted – jujka Aug 22 '18 at 14:03
  • Thanks again, and I have marked the answer as accepted @Georgy Savatkov. Thanks also for the suggestion with the timestamp. Good idea. – David Aug 22 '18 at 15:04