Download file using default download functionality
Download from url
in this just send file url.
Download from url
in this just send file url.
public void startDownload(Context context,String url) { String fullurl = url; String title = "title"; String fileName = "title"; try { String servicestring = Context.DOWNLOAD_SERVICE; DownloadManager downloadmanager; downloadmanager = (DownloadManager) context.getSystemService(servicestring); Uri uri = Uri.parse(fullurl); DownloadManager.Request request = new DownloadManager.Request(uri); request.setTitle(title); request.setDestinationInExternalPublicDir("/Download/MP3/", fileName + ".mp3"); Long reference = downloadmanager.enqueue(request); } catch (Exception e) { } }