Android Question any way to prevent Android from pausing a process

f0raster0

Well-Known Member
Licensed User
Our App is running almost 24/7 connecting to the server.
screen on all the time.

When the user don't do anything in a long time, example, ~60min the App fail connecting to the server, until we reset the App.
When the user is active using the App, all OK

It looks to me Android is pausing process when the Tablet is not used (or screen not touched)

Any way to prevent Android from pausing a process?

thanks for any idea
 

f0raster0

Well-Known Member
Licensed User
foreground and asking to the server every 10sec

All Ok if the user is using the App often (touching the screen)

will try to create a small App with the problem.
 

Erel

Administrator
Staff member
Licensed User
Good question. The watchdog has a foreground service. The device itself is never sleeping because the main app keeps the screen turns on.

The watchdog app is small and simple enough to run "forever" without any issues. If there were any issues then the main app can periodically start it with an intent. Nothing happens if the target app is already running.
 

Bob Spielen

Active Member
Licensed User
Good question. The watchdog has a foreground service. The device itself is never sleeping because the main app keeps the screen turns on.

The watchdog app is small and simple enough to run "forever" without any issues. If there were any issues then the main app can periodically start it with an intent. Nothing happens if the target app is already running.
Could you pls send an example?
Thanks in advance..
 
Top