Answer the question
In order to leave comments, you need to log in
How to implement downloading a file from an android application via a direct link?
I am writing a mobile application for Android and I need to make a link to download the file (doc, docx, rtf, I think it doesn’t matter what to download).
How it to implement standard means?
I found the solution only for programs running Windows, how to do it on Android?
Answer the question
In order to leave comments, you need to log in
If you write for android in a normal way, this is easy to do using DownloadManager 'a.
You can also stupidly open a browser with a link.
final String url = "http://your.link";
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question