Slrtce/app/src/main/java/com/sssa/slrtce/misc/utils/Helper.java
/**
     * Download File onClick
     * @param Name
     * @param fileurl
     */
Download File onClick
@param Name
@param fileurl
Download File onClick @param Name @param fileurl
public static void downloadFile(Context context,String Name, String fileurl){
        DownloadManager downloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
        DownloadManager.Request request = new DownloadManager.Request(Uri.parse(fileurl));
        request.setTitle(Name)
                .setNotificationVisibility(0)
                .setVisibleInDownloadsUi(true)
                .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE)
                .setDescription("Downloading in progress...")
                .setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileurl)
                .allowScanningByMediaScanner();
        downloadManager.enqueue(request);
    }
public static void downloadFile ( Context context , String Name , String fileurl ) { DownloadManager downloadManager = ( DownloadManager ) context . getSystemService ( Context . DOWNLOAD_SERVICE ) ; DownloadManager . Request request = new DownloadManager . Request ( Uri . parse ( fileurl ) ) ; request . setTitle ( Name ) . setNotificationVisibility ( 0 ) . setVisibleInDownloadsUi ( true ) . setAllowedNetworkTypes ( DownloadManager . Request . NETWORK_WIFI | DownloadManager . Request . NETWORK_MOBILE ) . setDescription ( "Downloading in progress..." ) . setDestinationInExternalPublicDir ( Environment . DIRECTORY_DOWNLOADS , fileurl ) . allowScanningByMediaScanner ( ) ; downloadManager . enqueue ( request ) ; }
Download File onClick
 @param Name
 @param fileurl
Download File onClick @param Name @param fileurl