i made an application which keep the screen awake, and it works fine until it gets killed by the system.
How can i keep my app running in background?
I see a lot of apps that uses notifications to stay running and avoid being killed, but i don’t know how to implement it.
Can someone help me achieve this?
i made an application which keep the screen awake, and it works fine until
Share
You can use the Service API for this, specifically the startForeground(int, Notification) function call. There is an example provided in the API documentation that I have linked to.