Thorsten Dittmar
Thorsten Dittmar

Reputation: 56727

Using the WorkManager on Android

In my app I need to upload data periodically to a server if data to be uploaded is available. This doesn't need to happen right away, but can also be delayed for a couple of minutes. WorkManager seems to be a good starting point from what I've read about it.

I'm now unsure which way to choose:

Both solutions seem to have their pros and cons. The choice depends on some questions I still have:

EDIT
OK, I just found a blog post that stated that WorkManager ensures that the work is done even if the app or the device is restarted. I'm going to give it a try and see what happens. Still, feel free to answer my questions so I can sleep better...

Upvotes: 1

Views: 269

Answers (1)

Ankit Wala
Ankit Wala

Reputation: 132

One more point to note in your use case that to make sure you are using a unique periodic work concept otherwise you will have multiple periodic works running around unnecessarily.

Upvotes: 1

Related Questions