Closed Faiyyaz closed 4 years ago
In April 2019 we announced that Firebase Job Dispatcher would be deprecated today, April 7th 2020. For this reason we are going to close all open issues and archive the repository. We will also stop supporting FJD for new app installations (such as those targeting sdk versions greater than Android Q). Existing apps that rely on FJD should continue to function as usual.
While we will no longer work on FJD, we encourage you to migrate to Work Manager which is a superior tool and fully supported by the Android team.
Thank you for taking the time to try the library and provide this feedback. We sincerely appreciate your effort and we apologize for not addressing it in time.
I have created a job like this for sample but the job executes successfully even if i switch off the internet.
FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(getApplicationContext())); Job myJob = dispatcher.newJobBuilder() .setService(MyJobService.class) .setTag("my-tag0") .setRecurring(true) .setLifetime(Lifetime.UNTIL_NEXT_BOOT) .setTrigger(Trigger.executionWindow(0, 5)) .setReplaceCurrent(true) .setRetryStrategy(RetryStrategy.DEFAULT_EXPONENTIAL) .setConstraints(Constraint.ON_ANY_NETWORK) .build(); dispatcher.schedule(myJob);
Here is the log i have created a countdowntimer in my service
02-14 18:22:29.939 19287-19287/com.dexter.jobscheduler D/onTick:: 29992 02-14 18:22:29.994 19287-19287/com.dexter.jobscheduler D/onTick:: 29994 02-14 18:22:30.939 19287-19287/com.dexter.jobscheduler D/onTick:: 28991 02-14 18:22:30.995 19287-19287/com.dexter.jobscheduler D/onTick:: 28994 02-14 18:22:31.940 19287-19287/com.dexter.jobscheduler D/onTick:: 27991 02-14 18:22:31.995 19287-19287/com.dexter.jobscheduler D/onTick:: 27993 02-14 18:22:32.940 19287-19287/com.dexter.jobscheduler D/onTick:: 26990 02-14 18:22:32.997 19287-19287/com.dexter.jobscheduler D/onTick:: 26991 02-14 18:22:33.948 19287-19287/com.dexter.jobscheduler D/onTick:: 25983 02-14 18:22:33.997 19287-19287/com.dexter.jobscheduler D/onTick:: 25991 02-14 18:22:34.952 19287-19287/com.dexter.jobscheduler D/onTick:: 24979 02-14 18:22:34.997 19287-19287/com.dexter.jobscheduler D/onTick:: 24991 02-14 18:22:35.953 19287-19287/com.dexter.jobscheduler D/onTick:: 23977 02-14 18:22:35.997 19287-19287/com.dexter.jobscheduler D/onTick:: 23991 02-14 18:22:36.955 19287-19287/com.dexter.jobscheduler D/onTick:: 22976 02-14 18:22:36.998 19287-19287/com.dexter.jobscheduler D/onTick:: 22990 02-14 18:22:37.955 19287-19287/com.dexter.jobscheduler D/onTick:: 21976 02-14 18:22:37.999 19287-19287/com.dexter.jobscheduler D/onTick:: 21989 02-14 18:22:38.956 19287-19287/com.dexter.jobscheduler D/onTick:: 20974 02-14 18:22:38.999 19287-19287/com.dexter.jobscheduler D/onTick:: 20989 02-14 18:22:39.958 19287-19287/com.dexter.jobscheduler D/onTick:: 19973 02-14 18:22:39.999 19287-19287/com.dexter.jobscheduler D/onTick:: 19989 02-14 18:22:40.958 19287-19287/com.dexter.jobscheduler D/onTick:: 18972 02-14 18:22:40.999 19287-19287/com.dexter.jobscheduler D/onTick:: 18990 02-14 18:22:41.960 19287-19287/com.dexter.jobscheduler D/onTick:: 17971 02-14 18:22:41.999 19287-19287/com.dexter.jobscheduler D/onTick:: 17989 02-14 18:22:42.960 19287-19287/com.dexter.jobscheduler D/onTick:: 16971 02-14 18:22:43.000 19287-19287/com.dexter.jobscheduler D/onTick:: 16988 02-14 18:22:43.961 19287-19287/com.dexter.jobscheduler D/onTick:: 15969 02-14 18:22:44.000 19287-19287/com.dexter.jobscheduler D/onTick:: 15989 02-14 18:22:44.963 19287-19287/com.dexter.jobscheduler D/onTick:: 14967 02-14 18:22:45.000 19287-19287/com.dexter.jobscheduler D/onTick:: 14988 02-14 18:22:45.966 19287-19287/com.dexter.jobscheduler D/onTick:: 13965 02-14 18:22:46.000 19287-19287/com.dexter.jobscheduler D/onTick:: 13988 02-14 18:22:46.966 19287-19287/com.dexter.jobscheduler D/onTick:: 12964 02-14 18:22:47.002 19287-19287/com.dexter.jobscheduler D/onTick:: 12987 02-14 18:22:47.967 19287-19287/com.dexter.jobscheduler D/onTick:: 11963 02-14 18:22:48.002 19287-19287/com.dexter.jobscheduler D/onTick:: 11986 02-14 18:22:48.970 19287-19287/com.dexter.jobscheduler D/onTick:: 10960 02-14 18:22:49.002 19287-19287/com.dexter.jobscheduler D/onTick:: 10987 02-14 18:22:49.972 19287-19287/com.dexter.jobscheduler D/onTick:: 9958 02-14 18:22:50.002 19287-19287/com.dexter.jobscheduler D/onTick:: 9986 02-14 18:22:50.974 19287-19287/com.dexter.jobscheduler D/onTick:: 8956 02-14 18:22:51.002 19287-19287/com.dexter.jobscheduler D/onTick:: 8986 02-14 18:22:51.977 19287-19287/com.dexter.jobscheduler D/onTick:: 7954 02-14 18:22:52.003 19287-19287/com.dexter.jobscheduler D/onTick:: 7986 02-14 18:22:52.977 19287-19287/com.dexter.jobscheduler D/onTick:: 6953 02-14 18:22:53.003 19287-19287/com.dexter.jobscheduler D/onTick:: 6985 02-14 18:22:53.979 19287-19287/com.dexter.jobscheduler D/onTick:: 5951 02-14 18:22:54.004 19287-19287/com.dexter.jobscheduler D/onTick:: 5984 02-14 18:22:54.981 19287-19287/com.dexter.jobscheduler D/onTick:: 4950 02-14 18:22:55.005 19287-19287/com.dexter.jobscheduler D/onTick:: 4983 02-14 18:22:55.982 19287-19287/com.dexter.jobscheduler D/onTick:: 3949 02-14 18:22:56.007 19287-19287/com.dexter.jobscheduler D/onTick:: 3982 02-14 18:22:56.984 19287-19287/com.dexter.jobscheduler D/onTick:: 2947 02-14 18:22:57.008 19287-19287/com.dexter.jobscheduler D/onTick:: 2981 02-14 18:22:57.985 19287-19287/com.dexter.jobscheduler D/onTick:: 1945 02-14 18:22:58.008 19287-19287/com.dexter.jobscheduler D/onTick:: 1980 02-14 18:22:59.932 19287-19287/com.dexter.jobscheduler D/onFinish:: finish 02-14 18:22:59.989 19287-19287/com.dexter.jobscheduler D/onFinish:: finish