I know this can be done with some apps with Tasker and Automate, but I want to learn this by myself.
- Create a app that runs always in background;
- How to read a sensor data(in this case I would like to use the 'Ambient light sensor');
- Lock the screen.
I have Android Studio and everything is ready to make a app and compile, but I have no idea how to make this / where to start. Thanks for any help.