Skip to content Skip to sidebar Skip to footer

Send And Forget Library For Android

When I program apps, usually I need to do something that can fail (the most typical is send something to a server), many times the 'send and forget' would be the best option (or a

Solution 1:

As @CodeChimp says, you'll probably need to roll your own.

That said, the usual pattern for Android is to write a Service that handles saving/retry. Your app would pass the data to the service (send and forget), and the service would then take care of trying to send in the background.

The big question for this sort of thing is always how to handle failure. What happens after the save fails some number of times? You're on your own here too. Depending on your situation, you could notify the user (via a Notification), save the error in the app's database, and notify the user in the app's UI, etc...

Post a Comment for "Send And Forget Library For Android"