این کدیه که توی onClickListener دکمه نوشتم :
@Override
public void onClick(View v) {DownloadManager downloadManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE) ک
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(questionha.get(p osition).getQuestionDownLink()));
request.setTitle(questionha.get(position).getQuest ionTitle());
request.setDescription("در حال دانلود");
request.setDestinationInExtealPublicDir(Environm ent.DIRECTORY_DOWNLOADS, questionha.get(position).getQuestionDownFileName() );
long enqueueId = downloadManager.enqueue(request);}
برچسب:
نویسنده: محمد رضا جوادیان