Good morning,
I have a problem with my app and I think, I have found the origin. But I'm not sure, if this is possible. Maybe you can help me?
My app contains a service, which is scheduled every 10-60 seconds. In most cases, everything is working fine. But rarely, my app crashes when service is starting at scheduled time. I think, that OS kills my app (because of low memory) before my service starts again at scheduled time.
For me, it looks like:
1.) I start my app
2.) Process-global variables are set and service is scheduled with StartServiceAt(...)
3.) OS kills my app (because of low Memory)
4.) My scheduled service starts, but my process-global variables are empty
Is this situation (step 4) possible? I'm testing on Android 4.3, 4.4, 6.0, 7.1.
By the way: do you have an idea, how can I simulate the situation, when Android kills my app from Memory? I want to test my app for this situations before I deliver it to the users? For example: if I go into the app-manager from Android (Settings - App Manager) and stop my app. Is this the same behaviour like Android do it, when memory is running out?
Thank you in advance!!
Best regards,
Wolfgang