Hisham Muneer
Hisham Muneer

Reputation: 8742

How to find the file downloaded by web browser in Android

I am using this code to download a file from my Activity. It downloads the file correctly on emulator and shows the downloading in notification too. But when i click on notification it just goes off.

String url = "http://developer.android.com/shareables/training/ActivityLifecycle.zip";
                Intent intent = new Intent(Intent.ACTION_VIEW);
                Uri u = Uri.parse(url);
                intent.setData(u);
                startActivity(intent);

I need to store the path of this downloaded file.

Thanks in advance...:)

Upvotes: 0

Views: 693

Answers (1)

ben75
ben75

Reputation: 28726

I think the locations of files downloaded by web browser is left to web browser discretion (no obligation to publish it). So I think the best you can do is changing your strategy :

Upvotes: 1

Related Questions