How to access the percent of Android download manager?
<p>I'm using the Android download manager in my app. How can I access the progress of the download (like the percent of download in Notification) for showing that percent in my progress bar inside the activity?</p>

<p>This is my method that downloads the file:</p>

<pre><code>////////////////////////////////////////////////////////////
//================== btn download set on click listner  ===========
////////////////////////////////////////////////////////////

holder.btnDownload.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {

        dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
        Uri downloadUri = Uri.parse(questionha.get(position).getQuestionDownLink());
        if (!Uri.EMPTY.equals(downloadUri)) {

            Request request = new Request(downloadUri);
            request.setTitle(questionha.get(position).getQuestionTitle());
            request.setDescription("Downloading ....");
            request.setDestinationInExternalFilesDir(v.getContext(), "downloaded", questionha.get(position).getQuestionDownFileName());
            enqueue = dm.enqueue(request);
        }else {
            Log.i("Download manager","Download manager url is null !");
        }

    }
});
</code></pre>