Screen lock - how to exit by code?

I have an app that receives sms and executes code according to the received message
If the phone is with the screen lock, however, the program is not displayed to the operator
Is there a way, by code, to exit the lock screen?
What if the screen lock has a password?

Fortunately not yet. Hopefully it stays that way.


With the right permissions I believe that no function can be considered unwanted

Maybe this can help you :

Or you can use an extension :

You did not read the post correctly, they are asking how to bypass the lockscreen.

I know, but the screen lock happens because first the phone turns off temporarily and finally the screen lock appears, do you understand

How can you make it ??
Can you help me to make it?