D
D
Denis2019-04-24 14:41:12
Android
Denis, 2019-04-24 14:41:12

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

2 answer(s)
D
Denis Zagaevsky, 2019-04-24
@zagayevskiy

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);

K
kalapanga, 2019-04-24
@kalapanga

In theory, there is the same TIdHTTP that you can use in the Windows application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question