I am using Firebase Job Dispatcher to schedule jobs in Android. https://github.com/firebase/firebase-jobdispatcher-android
The job is meant to run in every 12 hours.
Is it possible to test the job by changing date time of the device to a future date?
Like, will the job get triggered after changing the device time to the next day or so?
-- EDIT - by the way, I tested like so and the job is not triggered. Is that an expected behavior?
Yes, generally it'll not be triggered - especially on newer droids.
There is much on the web about this, even here - What tools are available to test JobScheduler?
In short: use
adb shell dumpsys jobscheduler
to obtain list with schedulled jobs, find yours by application Id, and then you can trigger it byadb shell cmd jobscheduler run
command - take care about job restrictions, or use-f
to get over them