Is there any easy way to start an app when you press the button to lock your screen? I've seen custom lock screens before so I know it's possible even if I have to make my own app for it. I have an app that I want to pop up every time the screen is unlocked, but it doesn't do it on it's own. I've seen/used other apps that could do this so if necessary I would code my own app to do this, but I'd prefer an already existing, preferably free option.
There might be multiple solutions to this. One I can think of involves the use of Tasker, the most flexible automation tool for Android. You could create a profile that triggers on "Screen Unlock", and have it start an app.
However: though there's a free 7 day trial available on the projects homepage, after that the app costs about 5 Euro. There are many other automation apps available on the playstore which might be able to achieve the same. As a long-time Tasker user I no longer try the others, so I cannot tell for sure.
Condition: Event → Display → Display Unlocked
Task: App → Load App → (select your app here)