Reputation: 6973
I have an Android project where I have an Activity that downloads a .APK file. After the download is complete I need to fire another Activity that installs it.
How can I make the Install Activity fire only after the Download Activity is complete?
Upvotes: 0
Views: 105
Reputation: 41
While MByD is probably in correct in that you probably want to use AsyncTask for downloading, to answer your question directly, you would use a parent activity and call your downloading activity with startActivityForResult and then set onActivityResult to start the next activity when returning with some value (eg. public final static int ON_DOWNLOAD_COMPLETE = 1
).
Upvotes: 1