I have 3 activities A,B, & C. In activity A i started download of one file, from there I go to activity B and from there C. Now what i want is to show the Progressbar of the file downloading which i started in Activity A in Activity B & C.
How can i achieve this in android. If anyone has any idea please kindly help me. All suggestions are welcome.
I would suggest doing the download in a Service, not in a thread tied to an Activity. The service can broadcast progress updates and each activity register to receive them. Or each Activity can bind to the Service and ask for updates. There’s a nice tutorial here about downloading a file with a Service.
A further advantage of this is that the download won’t be orphaned if the activity is destroyed and restarted (when, for example, the user rotates the device).