have a problem with a system. I have running service, which is constantly checking the position and counting the distance and time since user start it. But after 20-25 minutes and many interactions with other applications service is being killed.
How I can prevent it?
I’m thinking to add second service which will keep my alive.
1, minimize your service’s memory usage
2, make you service foreground, for example in the service’s onCreate method