Confused in choosing between Firebase JobDispatcher vs AlarmManager
Don't be confused. AlarmManager API has some significant flaws with accuracy (Setting a task to start at a particular time in future). It has been accepted by Google. When you try to use alarm manager, it shows a warning about it's inaccuracy. Go with FirebaseJobDispatcher. It was created to replace AlarmManager. This is what you need 99% of the times when you need to schedule some operation for some other time (or repeat at certain time interval)
Firebase Job Dispatcher interval between jobs increases over time
This is due to your
.setRetryStrategy(RetryStrategy.DEFAULT_LINEAR)
If you have a look at this file https://github.com/firebase/firebase-jobdispatcher-android/blob/master/jobdispatcher/src/main/java/com/firebase/jobdispatcher/RetryStrategy.java
its is evident that the retry statergy increases linearly in
/** Expected schedule is: [30s, 60s, 90s, 120s, ..., 3600s] */
You can try creating your own custom retry policy by following the link below
https://github.com/firebase/firebase-jobdispatcher-android/issues/179
Does Firebase Job dispatcher needs internet access for scheduling job?
when you use .setConstraints(Constraint.ON_ANY_NETWORK)
the job will be executed when there is any type of network connection, You can choose between none, any and unmetered (Wifi), by default it's NONE
so just delete the setConstraints
Related Topics
How to Get Ndk-Gdb Working on Android
Android Java - Joda Date Is Slow
Display Huge Images in Android
Dynamically Updating an Autocompletetextview Adapter
Importing Jar Libraries into Android-Studio
Mylib.So Has Text Relocations. This Is Wasting Memory and Is a Security Risk. Please Fix
Get Android Google Analytics Referrer Tag
Android Locationmanager.Getlastknownlocation() Returns Null
Play Sound on Phonegap App for Android
How to Change the Track Color of a Switchcompat
Caused By: Java.Lang.Outofmemoryerror: Bitmap Size Exceeds Vm Budget
How to Compile a Static Library Using the Android Ndk
Http Status Code in Android Volley When Error.Networkresponse Is Null
How to Create Expandable Listview in Flutter
Setrotation(90) to Take Picture in Portrait Mode Does Not Work on Samsung Devices