I am displaying a notification from my application and this notification has an action in it, when user clicks on the action, the c
In the Activity you are opening (that is behind the lock screen) you should tell system to lift the keyguard (e.g. in onCreate())
For API >= 26
KeyguardManager km = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
km.requestDismissKeyguard(this, null); // you may add callback listener here
For API < 26:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
If device is not locked securely it would unlock it immediately, and if it is locked, it will ask user to do it.