![]() ![]() You have to get it from extra DownloadManager.EXTRA_DOWNLOAD_ID. Getting ID in broadcast for action _COMPLETE seems reliable. Getting a value from extra DownloadManager.EXTRA_DOWNLOAD_ID does not work for this action.And if the first download is finished/canceled, it returns null for notification of the remaining downloads. ![]() If it returns something on some devices, it is the ID of the download started first. EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS does not work properly. Getting download IDs from extra DownloadManager.Then retrieve the IDs from the returned Cursor, they are stored in the column named DownloadManager.COLUMN_ID.įrom my experience, it is not reliable to retrieve download ID via BroadcastReceiver for action _NOTIFICATION_CLICKED (though the broadcast is always sent). Query the DownloadManager for downloads via query(DownloadManager.Query) method.Remember the return value of enqueue(DownloadManager.Request) method.From my experience there basically are two reliable ways how to get it: For this you need the ID of the download. You can cancel downloads via DownloadManager by calling its remove(long.) method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |