I have recently developed an Android app using a node.js webpack project.
After installing the app on my phone, I observed that it enters a sleep mode along with the phone. Consequently, a JavaScript timer I set up stops functioning as intended:
pingTimer=setInterval(ping,pingInterval);
I am looking for a way to prevent my app from going to sleep, at least for the time being. Eventually, I will consider allowing the app to enter a sleep state, but for now, I need it to stay awake while the phone sleeps.
UPDATE
I attempted to follow the steps outlined in this guide:
Unfortunately, I did not achieve the desired result.