Stillie
Stillie

Reputation: 2676

WorkManager running every x minutes with new parameter

I need to make an API call every X minutes, but it needs new int value each time that is needed in the API call when the worker runs?

So far, through the examples here, it seems like, it will run the same call, with the same parameters every X minutes.

I need to pass a different value each time this job is going to run?

Upvotes: 0

Views: 184

Answers (1)

Stillie
Stillie

Reputation: 2676

The only solution I can find is by saving the battery level to sharedprefs then pulling the data from shared prefs when I need it.

Upvotes: 0

Related Questions