Code example for DownloadManager

Methods: enqueue

0
                    = (DownloadManager) activity.getSystemService(Context.DOWNLOAD_SERVICE);
            new Thread("Browser download") {
                public void run() { 
                    manager.enqueue(request);
                } 
            }.start();
        } 
        Toast.makeText(activity, R.string.download_pending, Toast.LENGTH_SHORT)
                .show(); 
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE