I am not sure that I understand exactly your requirement. However, when it comes to controlling the screen dimming or screen lock in a hybrid Cordova application, there are a couple of plugins you can use:
Further, the Cordova API exposes two events related to the app's state:
- Telerik Verified Insomnia plugin allows you to prevent the screen from dimming (and locking the device) while the user is not touching the screen.
- PowerManagement plugin which offers access to the devices power-management functionality. It should be used for applications which keep running for a long time without any user interaction. You can import it in an AppBuilder project following these instructions and you can also have a look at this forum thread where you will find a sample project demonstrating the plugin's functionality.
- pause: the event fires when the native platform puts the application into the background, typically when the user switches to a different application.
- resume: the event fires when the native platform pulls the application out from the background.
Let me know if this information helps and if you have more questions.