Add Actionable Notification isAuthenticationRequired

Currently actionable notifications do not require unlocking the phone. I would like to use it for disarming my alarm, but would want to require the phone to be unlocked for security. Android’s API supports this through isAuthenticationRequired

So ideally a parameter could be added in the action config for requiring authentication.

This will only work on newer Android devices. API 31+ only. Will that work for you?

Thanks for quick reply. That’s fine for me!

1 Like

one more thing to keep in mind is that this setting will not always require authentication.

https://developer.android.com/reference/android/app/Notification.Action.Builder#setAuthenticationRequired(boolean)

If this is true and the device is locked when the action is invoked, the OS will show the keyguard and require successful authentication before invoking the intent. If this is false and the device is locked, the OS will decide whether authentication should be required.

I believe currently the default is false as we are not using this API call yet.

Based on that setting it sounds like it works as I want. If set to true, the phone either needs to be already unlocked, or will ask to be unlocked.

Is this an option for Android yet?