0

As soon as I receive a push notification from my app I want to trigger the KeyguardManager to launch the fingerprint/pass code screen to open the phone from lock screen so that person can enter the phone and unlock the device. I want to trigger this programmatically similar to when we click on any notification from lock screen we get the fingerprint/pass-code screen.

I did a lot of RnD but didn't find any solution, this is one of the challenging use case task given to me in class, I have been exploring a lot from quite few weeks with no success at all. Did tried Broadcast receiver with BiometricManager and many things with no success, any lead will be very helpful.

Nobody
  • 58
  • 1
  • 9

1 Answers1

0

As soon as you receive push message, onNotificationReceived() (or some other method if you use some 3rd party libs) method gets called as below. from there, you can launch your Main screen where you have written biometric/unlocking code.

class MyReceiver : PushReceiver {

    override fun onNotificationReceived(message: Message) : Boolean {
        //Launch your MainActivity where you can show Unlock screen.
          return super.onNotificationReceived(message);
    }

 }
DevDin
  • 46
  • 4