I need to download some files (10-20 or depends on user) from service in my app. The problem is I am using IntentSevice and finding it hard to update activity UI. I know following ways to update UI
- Use handler and send messages from service to activity using Messenger like this.
- Send broadcast intents.
Using first method would cause problem once activity is closed & re-opened and also I am not sure about its performance. Using second would definitely cause perfomance issues since I need to update UI quite frequently (once or twice every two seconds). Is there anyother possible way of exchanging data between IntentService and Activity which is efficient? or I have to switch it to Bound Service?