starting a workManger from broad cast receiver when the app is not running
its working fine, but when the ram is low (ignore why its low, its just low) work manger’s doWork/wholeApplication proccess get’s killed now is there any way i can restart this same worker.
some might tell to return Result.retry(); but that will only work if we return it but when the execution get’s stopped of all of sudden there seems to be no way to return it.
OneTimeWorkRequest workRequest =
new OneTimeWorkRequest.Builder(Worker.class)
//.setInitialDelay(15, TimeUnit.MINUTES)
//.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
.setBackoffCriteria(
BackoffPolicy.EXPONENTIAL,
5,
TimeUnit.MINUTES
)
.build();
foreground service won’t work as it won’t be able to start from broad cast anyother way?