Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Commit

Permalink
wip commit #296
Browse files Browse the repository at this point in the history
  • Loading branch information
wkh237 committed Mar 27, 2017
1 parent cafb7f2 commit 4ad60a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,14 @@ public void onReceive(Context context, Intent intent) {
// the file exists in media content database
if (c.moveToFirst()) {
String contentUri = c.getString(c.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
// handle download manager error status code #296
int status = c.getInt(c.getColumnIndex(DownloadManager.COLUMN_STATUS));
if(status == DownloadManager.STATUS_FAILED) {
// TODO
}
else if ( status == DownloadManager.STATUS_SUCCESSFUL) {
// TODO
}
Uri uri = Uri.parse(contentUri);
Cursor cursor = appCtx.getContentResolver().query(uri, new String[]{android.provider.MediaStore.Images.ImageColumns.DATA}, null, null, null);
// use default destination of DownloadManager
Expand Down

0 comments on commit 4ad60a4

Please sign in to comment.