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

Commit 07e9d71

Browse files
Ryan Pfisterwkh237
Ryan Pfister
authored andcommitted
making it so there are more options for notifications visibility (#315)
1 parent 4fb9da7 commit 07e9d71

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ public void run() {
142142
if (options.addAndroidDownloads.getBoolean("useDownloadManager")) {
143143
Uri uri = Uri.parse(url);
144144
DownloadManager.Request req = new DownloadManager.Request(uri);
145-
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
145+
if(options.addAndroidDownloads.hasKey("notificationsEnum")) {
146+
req.setNotificationVisibility(options.addAndroidDownloads.getInt("notificationsEnum"));
147+
}
148+
else{
149+
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
150+
}
146151
if(options.addAndroidDownloads.hasKey("title")) {
147152
req.setTitle(options.addAndroidDownloads.getString("title"));
148153
}

0 commit comments

Comments
 (0)