I'm currently trying to create a firebase JobDispatcher within my android app that will start a job around 3am on a monday, regardless of when the job is created. I have seen examples of using Joda-Time, the Period class and TemporalAdjusters, but I am trying to support API levels 16 and up, so I need something that will work with those.
Currently I am building a new job with the following constraint (among others) .setTrigger(Trigger.executionWindow(secondsUntilMonday, secondsUntilMonday + toleranceInterval))
But I can't seem to find any examples of how to set my secondsUntilMonday to the number of seconds between when the method is called and around the next time 3am on a Monday rolls around.
Please help!