I want to ask a question about the best way to reload activity when my service stops. So what I’m doing is:
- I’m downloading data from JSON API via service and I’m showing a progressbar while doing this on top of all activities in my application.
What I want to do is:
- When my service stops (all the data is downloaded) I want to refresh the current activity.
So any ideas on which is the best way and what do I have to use to achieve this?
Thanks in advance!
You can use
IntentServicein this case. Just send your Intent to the IntentServicesonHandleIntent()do your background process and fire aBroadCastReceiverto update your Activity.Example for IntentService Updating UI.