I configured a periodic work manager request and seems like it's working on Pixel(Android version 9.0) but fails on Samsung device which is also running on 9.0
//Work manager request
final PeriodicWorkRequest workRequest = new PeriodicWorkRequest.Builder(MyWorker.class, 1, TimeUnit.HOURS).build();
WorkManager.getInstance().enqueueUniquePeriodicWork("My_TASK", ExistingPeriodicWorkPolicy.REPLACE, workRequest);
// My worker
public class MyWorker extends Worker {
public MyWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@NonNull
@Override
public Result doWork() {
//some work
return Result.success();
}
}