Nowadays the built-in Android browser has been replaced by Chrome, which does this perfectly well. You can long-press and save virtually any image or link, and even videos from a number of sites that couldn't be easily done on the desktop.

Answer below for older devices:

The Android browser by default can only download files that the Android system "recognizes" (i.e., there has to be a program registered to handle that file type). It's a stupid restriction in my opinion, but you can install Download Crutch to overcome this limitation (it registers itself for every filetype).

If you're referring to images that link to something else and you want to save the something else, long-press on the image and choose "Save Link As" or similar.

Answer from Matthew Read on Stack Exchange
Top answer
1 of 4
11

Nowadays the built-in Android browser has been replaced by Chrome, which does this perfectly well. You can long-press and save virtually any image or link, and even videos from a number of sites that couldn't be easily done on the desktop.

Answer below for older devices:

The Android browser by default can only download files that the Android system "recognizes" (i.e., there has to be a program registered to handle that file type). It's a stupid restriction in my opinion, but you can install Download Crutch to overcome this limitation (it registers itself for every filetype).

If you're referring to images that link to something else and you want to save the something else, long-press on the image and choose "Save Link As" or similar.

2 of 4
9

Personally I usually just click the link of the file and it downloads.

As for the image: try long pressing but instead of choosing "Save As" look for "Copy link URL" or "Open in New Window" or something similar to those two menu options. "Copy link URL" should copy the URL of the file to your clipboard, then you can paste that link in the address bar and hit "Go" and it should download your file. "Open in New Window" should essentially do the same thing (i'm just trying to give you as many options as I can to try). If you click on the link it may not take you anywhere but to a blank page while the file downloads.

So to check your download list: You may have already tried this but to see if the file was downloaded you can open your browser, open the menu, then select "More", you should see "Downloads". This is where your downloaded files list is.

Another way you could check is to look in the "downloads" folder on your sdcard (/sdcard/downloads/) using ES File Explorer or some other file explorer.

If this is not a solution let me know and give an example of what you are trying to accomplish and I'll try to figure it out.

๐ŸŒ
Filegrab
filegrab.net
Download File from URL online (Free)
Copy the link or URL of the file you want to download. Paste the copied link into the input field. Click on the "Download" button to start the downloading process. Wait for the download to complete. Once the download is finished, the file will be saved to your device automatically.
๐ŸŒ
Website Downloader
websitedownloader.com โ€บ home โ€บ download file from url online
Download File from URL Online - WebsiteDownloader.com
August 23, 2023 - Itโ€™s that simple! With WebsiteDownloader, you can download any file from a URL online in just a few clicks.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ android โ€บ how-to-download-file-from-url-in-android-programmatically-using-download-manager
How to Download File from URL in Android Programmatically using Download Manager? - GeeksforGeeks
July 23, 2025 - In this article, we are going to ... files from an URL using Download Manager. Here we will be simply adding the link of the file available online. When we click on the Button it will be downloaded automatically to our phone storage.
Top answer
1 of 2
6

How to download file from Url

fun downloadPdf(baseActivity:Context,url: String?,title: String?): Long {
        val direct = File(Environment.getExternalStorageDirectory().toString() + "/your_folder")

        if (!direct.exists()) {
            direct.mkdirs()
        }
        val extension = url?.substring(url.lastIndexOf("."))
        val downloadReference: Long
         var  dm: DownloadManager
         dm= baseActivity.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
        val uri = Uri.parse(url)
        val request = DownloadManager.Request(uri)
        request.setDestinationInExternalPublicDir(
                "/your_folder",
                "pdf" + System.currentTimeMillis() + extension
        )
        request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
        request.setTitle(title)
        Toast.makeText(baseActivity, "start Downloading..", Toast.LENGTH_SHORT).show()

        downloadReference = dm?.enqueue(request) ?: 0

        return downloadReference

    }

Bofore calling this method do check for Runtime permission:

Manifest.permission.WRITE_EXTERNAL_STORAGE
2 of 2
5

Please try this code

public void downloadPdf(String url, String sem, String title, String branch) {
Uri Download_Uri = Uri.parse(url);
DownloadManager.Request request = new DownloadManager.Request(Download_Uri);

//Restrict the types of networks over which this download may proceed.
request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE);
//Set whether this download may proceed over a roaming connection.
request.setAllowedOverRoaming(false);
//Set the title of this download, to be displayed in notifications (if enabled).
request.setTitle("Downloading");
//Set a description of this download, to be displayed in notifications (if enabled)
request.setDescription("Downloading File");
//Set the local destination for the downloaded file to a path within the application's external files directory
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, title + "_" + branch + "_" + sem + "Year" + System.currentTimeMillis() + ".pdf");

request.allowScanningByMediaScanner(); 
request. setNotificationVisibility(DownloadManager.Request. VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION)

//Enqueue a new download and same the referenceId
downloadReference = downloadManager.enqueue(request);

}

attach broadcast receiver

BroadcastReceiver attachmentDownloadCompleteReceive = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) {
        long downloadId = intent.getLongExtra(
                DownloadManager.EXTRA_DOWNLOAD_ID, 0);
        openDownloadedAttachment(context, downloadId);
    }
}
};


private void openDownloadedAttachment(final Context context, final long downloadId) {
DownloadManager downloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Query query = new DownloadManager.Query();
query.setFilterById(downloadId);
Cursor cursor = downloadManager.query(query);
if (cursor.moveToFirst()) {
    int downloadStatus = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
    String downloadLocalUri = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
    String downloadMimeType = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_MEDIA_TYPE));
    if ((downloadStatus == DownloadManager.STATUS_SUCCESSFUL) && downloadLocalUri != null) {
        openDownloadedAttachment(context, Uri.parse(downloadLocalUri), downloadMimeType);
    }
}
cursor.close();
} 
๐ŸŒ
Google Play
play.google.com โ€บ store โ€บ apps โ€บ details
All File & Video Downloader - Apps on Google Play
Look no further than All File & Video Downloader, the ultimate browser and documents download manager for all your downloading needs!โšก With Internet Download Manager, you can easily access and download all downloadable files from any website, including videos, mp3s, images, PDFs, and much more.
Rating: 4.2 โ€‹ - โ€‹ 157K votes
๐ŸŒ
Reddit
reddit.com โ€บ r/pdf โ€บ how to download pdf file via link on android phone?
r/pdf on Reddit: How to download pdf file via link on Android phone?
October 24, 2024 -

Hello, I have a reoccuring problem. Every time someone sends me a file in pdf format on for example Meta Messenger, my phone can't just download the file, it asks me to convert it to Google Docs pdf. But when in does, the file ends up being messed up to say gently.

When I receive same pdf via e-mail, there's no problem, I just click the attachment and phone downloads it without converting. Minor issue, but I'm tired of asking friends to re-send every file via e-mail, do you know any fix?

My phone is Google Pixel 6a with the newest Android I believe

Find elsewhere
๐ŸŒ
SaveTheVideo
savethevideo.com โ€บ home
Online Video Downloader and Converter [Updated 2025]
Download videos online from Vimeo, Dailymotion, Tiktok, Facebook, Twitter, Instagram or any other supported sites ... Save video and audio files using an alternative download method if the original download links are not working for some reason ... You can install this online application on your Android mobile phone or tablet with only one click, use Add to Homescreen in your browser (Chrome) menu.
Top answer
1 of 16
95

Using Async task

call when you want to download file : new DownloadFileFromURL().execute(file_url);

public class MainActivity extends Activity {

    // Progress Dialog
    private ProgressDialog pDialog;
    public static final int progress_bar_type = 0;

    // File url to download
    private static String file_url = "http://www.qwikisoft.com/demo/ashade/20001.kml";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        new DownloadFileFromURL().execute(file_url);

    }

    /**
     * Showing Dialog
     * */

    @Override
    protected Dialog onCreateDialog(int id) {
        switch (id) {
        case progress_bar_type: // we set this to 0
            pDialog = new ProgressDialog(this);
            pDialog.setMessage("Downloading file. Please wait...");
            pDialog.setIndeterminate(false);
            pDialog.setMax(100);
            pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            pDialog.setCancelable(true);
            pDialog.show();
            return pDialog;
        default:
            return null;
        }
    }

    /**
     * Background Async Task to download file
     * */
    class DownloadFileFromURL extends AsyncTask<String, String, String> {

        /**
         * Before starting background thread Show Progress Bar Dialog
         * */
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            showDialog(progress_bar_type);
        }

        /**
         * Downloading file in background thread
         * */
        @Override
        protected String doInBackground(String... f_url) {
            int count;
            try {
                URL url = new URL(f_url[0]);
                URLConnection connection = url.openConnection();
                connection.connect();

                // this will be useful so that you can show a tipical 0-100%
                // progress bar
                int lenghtOfFile = connection.getContentLength();

                // download the file
                InputStream input = new BufferedInputStream(url.openStream(),
                        8192);

                // Output stream
                OutputStream output = new FileOutputStream(Environment
                        .getExternalStorageDirectory().toString()
                        + "/2011.kml");

                byte data[] = new byte[1024];

                long total = 0;

                while ((count = input.read(data)) != -1) {
                    total += count;
                    // publishing the progress....
                    // After this onProgressUpdate will be called
                    publishProgress("" + (int) ((total * 100) / lenghtOfFile));

                    // writing data to file
                    output.write(data, 0, count);
                }

                // flushing output
                output.flush();

                // closing streams
                output.close();
                input.close();

            } catch (Exception e) {
                Log.e("Error: ", e.getMessage());
            }

            return null;
        }

        /**
         * Updating progress bar
         * */
        protected void onProgressUpdate(String... progress) {
            // setting progress percentage
            pDialog.setProgress(Integer.parseInt(progress[0]));
        }

        /**
         * After completing background task Dismiss the progress dialog
         * **/
        @Override
        protected void onPostExecute(String file_url) {
            // dismiss the dialog after the file was downloaded
            dismissDialog(progress_bar_type);

        }

    }
}

if not working in 4.0 then add:

StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy); 
2 of 16
72

Simple kotlin version

fun download(link: String, path: String) {
    URL(link).openStream().use { input ->
        FileOutputStream(File(path)).use { output ->
            input.copyTo(output)
        }
    }
}

is there anyway to get the download progress or downloaded size from this method ?

This is the same realization as defined in InputStream.copyTo, but with progress

/*inline*/ fun download(link: String, path: String, progress: ((Long, Long) -> Unit)? = null): Long {
    val url = URL(link)
    val connection = url.openConnection()
    connection.connect()
    val length = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) connection.contentLengthLong else
        connection.contentLength.toLong()
    url.openStream().use { input ->
        FileOutputStream(File(path)).use { output ->
            val buffer = ByteArray(DEFAULT_BUFFER_SIZE)
            var bytesRead = input.read(buffer)
            var bytesCopied = 0L
            while (bytesRead >= 0) {
                output.write(buffer, 0, bytesRead)
                bytesCopied += bytesRead
                progress?.invoke(bytesCopied, length)
                bytesRead = input.read(buffer)
            }
            return bytesCopied
        }
    }
}

An example of usage:

val handler = object : Handler(Looper.getMainLooper()) {

    override fun handleMessage(msg: Message) {
        // length may be negative because it is based on http header
        val (progress, length) = msg.obj as Pair<Long, Long>
    }
}

// call this outside of main thread
val totalSize = download("http://example.site/path/to/file", "path/to/file") { progress, length ->
    // handling the result on main thread
    handler.sendMessage(handler.obtainMessage(0, progress to length))
}
๐ŸŒ
Gitlab
jstool.gitlab.io โ€บ demo โ€บ chrome โ€บ download-file-from-url.html
Download File from URL for Chrome browser, add new download task | Demo | Example | jstool
create download task from link ... from a URL? a quick way to add new download task item for chrome ... I have a link, how to download the file from this link? This tool can help you quickly download files from links ยท I want to download pdf, but browser always opens it directly. This tool helps you download pdf files ยท I want to download HTML webpage, but browser always opens it directly. This tool helps you download HTML webpage files ยท Compatible with mobile phones (Android, iOS), ...
๐ŸŒ
B4X
b4x.com โ€บ home โ€บ forums โ€บ b4a - android โ€บ android questions
Can I download files from Url and store it inside the app like its assets folder in runtime? | B4X Programming Forum
December 22, 2022 - Click to expand... No. This is not possible. Files in ASSETS are readonly. They must exist in the Files-folder when compiling the App. You can store downloaded files in File.DirInternal to further access them.
๐ŸŒ
Firebase
firebase.google.com โ€บ documentation โ€บ cloud storage for firebase โ€บ download files with cloud storage on android
Download files with Cloud Storage on Android | Cloud Storage for Firebase
To download a file, first create a Cloud Storage reference to the file you want to download. You can create a reference by appending child paths to the root of your Cloud Storage bucket, or you can create a reference from an existing gs:// or https:// URL referencing an object in Cloud Storage.
๐ŸŒ
Stack Exchange
android.stackexchange.com โ€บ questions โ€บ 160256 โ€บ how-to-capture-downloading-address-of-downloading-file
How to capture downloading address of downloading file?
I am downloading the file in PC ... "copy link address" In Android, I know by long press on Download button, it gives menu so I can use "copy link address" to capture the address....
๐ŸŒ
Softonic
open-from-url-file-download.en.softonic.com โ€บ home โ€บ android โ€บ utilities & tools โ€บ open from url (file download)
Open From Url (File Download) APK for Android - Download
April 22, 2024 - Open From Url (File Download) for Android, free and safe download. Open From Url (File Download) latest version: A free program for Android, by ALTLIM
Rating: 8.2/10 โ€‹ - โ€‹ 1 votes
๐ŸŒ
Reddit
reddit.com โ€บ r/androidapps โ€บ any apps to download a url from the share button?
r/androidapps on Reddit: Any apps to download a url from the share button?
May 28, 2021 -

Discord mobile sucks so images from bot embeds save the title instead (so i have a bunch of files named "Pinterest (pinterest.com)" etc. instead of the actual name) but the share button gives you an actual link. Is there an app to download this url so it's quicker than opening in browser and saving from there and tabbing back to discord. this is the share menu in question

all googling is giving me is stack overflow posts from Android devs writing apps and no actual apps to do this

๐ŸŒ
Reddit
reddit.com โ€บ r/androidapps โ€บ app for downloading files from an url. (specifically imgur in this case)
r/androidapps on Reddit: App for downloading files from an URL. (specifically imgur in this case)
November 23, 2017 -

I want to download this video file using my phone somehow: https://i.imgur.com/6ro0m3w.mp4 This should be easy right? Can you do it using an app that's not specific to imgur?

I can view it and stream it just fine using Firefox, Chrome, VLC, Podcast Addict, cast it using Solid Explorer but none of them can save the video unless I'm missing something.

The Sync For Reddit link handler can't handle this video for some reason, if I try to download it using Firefox then I get a tiny broken .mp4 file.

I bet there are many apps that can download videos like nobody's business but what if I want to download a web page as an .html file? An Mp3? Any file that other apps can display from an URL?

I want a link handler that can download files using any link that other apps can open, or an app that lets me paste this link into it and downloads the file. Anyone know of an app like that?

Or alternatively is there a video app that can open a video link like this but it also let's you save the video?

EDIT: after posting this using sync for reddit I can click the mp4 link without problems and save it, weird that it did not work before... Still, the question still stands, can this it can be done without an app that is designed with imgur links in mind or from other web sites?

๐ŸŒ
DhiWise
dhiwise.com โ€บ post โ€บ flutter-download-file-from-url-a-step-by-step-guide
The Ultimate Guide to Flutter Download File from URL
April 25, 2025 - You'll initiate an HTTP request to a web server to download a file in Flutter. This request will be sent to a specific URL, the download link for your desired file. Tapping a download button in a Flutter app triggers a request to retrieve the ...
๐ŸŒ
Reddit
reddit.com โ€บ r/androidapps โ€บ any android app to download directly to smb/ftp
r/androidapps on Reddit: Any android app to download directly to smb/ftp
May 18, 2023 -

I'm looking for any kind of app or workaround to be able to download files directly from the internet to my network drive through SMB or FTP using my phone

SOLUTION: Thnx @Whooosh5 & @Long-Free

So while browsing, tap and hold link and select Share to... choose app, either Solid Explorer or MiXplorer, and then from the subsequent screens choose Save To (SE) or Copy To (Mix). Then browse to the target destination using the file manager, which should be bookmarked in the file manager app for convenience or you can just browse to it to define the share target then press Select which functionally starts the download.