Writing exception to parcel java.lang.IllegalStateException: Not one of standard directories: /storage/emulated/0/Android/data...............
DownloadManager dm = (DownloadManager) context.getSystemService(DOWNLOAD_SERVICE);
Uri uri = Uri.parse(s);
DownloadManager.Request req = new DownloadManager.Request(uri);
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
String filename = VideoTitle;
filename += ".mp4";
req.setDestinationInExternalPublicDir(context.getResources().getString(R.string.video_dir_path), filename);
req.setDestinationInExternalFilesDir(context,dir_path,filename);
StyleableToast.makeText(context,context.getResources().getString(R.string.download_started), Toast.LENGTH_SHORT, R.style.mytoast).show();
Long ref = dm.enqueue(req);
How to resolve this error??