I am encountering a SecurityException
crash on Android 8 with targetSDK 26
when using JobIntentService
.
This is from JobIntentSer
I've manually tested it, the max execution time is 600 seconds
which means 10 mins
. What happens next is the JobIntentService
gets destroyed then re-created to resume the rest of the work. This has been tested from Android Marshmallow
to Android Oreo
. I also haven't experienced any thrown exception, I'm also using Thread.Sleep()
method to simulate a long process.
Update 1: I've noticed that after a while the service stops or android puts it to sleep. so let's say if you're doing constant checks in the background i.e. api calls to get latest data to push notifications. it works for a while then stops after a day or 2.. I'm not sure why it randomly stops..