I am using workmanager to send sms at every Friday for reminder purpose. even, app is closed state also. sample:
PeriodicWorkRequest periodicWork = new
PeriodicWorkRequest.Builder(MyWorker.class, 7, TimeUnit.DAYS).build();
WorkManager.getInstance().enqueue(periodicWork);
can anyone help on this. Thanks.
Note: I have this onetime request. its working fine. even, app is closed also.
WorkManager workManager = WorkManager.getInstance();
workManager.enqueue(new OneTimeWorkRequest.Builder(MyWorker.class).build());
If suppose, workmanager is not possible, please suggest any other api also in android.
Already Refereed this link also: its not working. Schedule a work on a specific time with WorkManager