When my application is in idle state i.e. no one is using the application or it is closed but a background service which is running continuously. I have issue that background service in my application is crashing. It just happened two times. It is not happening on regular basis. I don't have any stack trace on Crashlytics but only a crash report that shows the application is crashing on Runnable
interface function run()
(screen shot attached)
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
context = getApplicationContext();
handler = new Handler();
handler.removeCallbacks(restartThread);
handler.post(restartThread);
return START_STICKY;
}
private Runnable restartThread = new Runnable() {
@Override
public void run() {
handler.postDelayed(restartThread, NOTIFY_INTERVAL);
}
};
Is this possible that OS is killing the background service due to low memory?