I am trying to create a watchdog that monitors my app and restarts my app if it crashes.
My app writes the datatime value every 10 seconds into a file in dirRootexternal. A service reads this file every X seconds to check whether my app is still saving datetime. If not, my app has probably crashed.
So far so good, however the service stops working while my app shows an error message on the screen.
Is there a way to solve this, i.e. to keep the service running at all times?
My app writes the datatime value every 10 seconds into a file in dirRootexternal. A service reads this file every X seconds to check whether my app is still saving datetime. If not, my app has probably crashed.
So far so good, however the service stops working while my app shows an error message on the screen.
Is there a way to solve this, i.e. to keep the service running at all times?