I have an android activity that downloads content from the web. The activity have progress bar and some indications about download. The user can press back and go to the main activity app. How can i make button that will show the download activity?
The code:
Intent i = new Intent("com.myapp.DOWNLOAD");
startActivity(i);
Starts again the activity and that is not what i want.
in your AndroidManifest.xml, modify your download activity to include the
launchMode="singleInstance"value. For example:This will create only one instance of DownloadActivity. Any subsequent requests to show this activity will pull the same instance.