When my user logs out of my app, I have to cancel scheduled work that would require him to be signed in. Unfortunately, that means the scheduled work is lost, e.g. syncing some data to the server that was edited while the user was offline.
My idea was to defer the work that is currently scheduled until the user has logged in again. Alternatively, as a work around I could set the initial delay to something like 50 years and change the delay back after the user has logged in. However, as far as I am aware none of both is possible with WorkManager at the moment.
Does anyone have any ideas of how to approach this? Or can we expect this kind of feature to be provided by WorkManager in the future maybe?