I want to give to my user a much better offline user experience, therefore, I want to build a Service
which stores all POST
, DELETE
,
Take a look at this library that I came across - Android Priority Job Queue.
You define your background tasks as Jobs and enqueue them to your JobManager instance. Job Manager will take care of prioritization, persistence, load balancing, delaying, network control, grouping etc. It also provides a nice lifecycle for your jobs to provide a better, consistent user experience.
Also, they monitor network connectivity. When a device is offline, jobs that require network connection won't run until network connectivity is restored.