From cfe625861811e59c802328dc86e30ff6130e9a73 Mon Sep 17 00:00:00 2001 From: Adeel Zafar Date: Tue, 19 Feb 2019 19:34:16 +0500 Subject: [PATCH] Fixed Download Notification when multiple files are downloaded --- .../java/org/kiwix/kiwixmobile/downloader/DownloadService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/kiwix/kiwixmobile/downloader/DownloadService.java b/app/src/main/java/org/kiwix/kiwixmobile/downloader/DownloadService.java index 54c484611..e465b6bc3 100644 --- a/app/src/main/java/org/kiwix/kiwixmobile/downloader/DownloadService.java +++ b/app/src/main/java/org/kiwix/kiwixmobile/downloader/DownloadService.java @@ -380,9 +380,10 @@ public class DownloadService extends Service { } } target.putExtra(EXTRA_NOTIFICATION_ID, notificationID); + target.setAction(Long.toString(System.currentTimeMillis())); PendingIntent pendingIntent = PendingIntent.getActivity (getBaseContext(), 0, - target, PendingIntent.FLAG_CANCEL_CURRENT); + target, PendingIntent.FLAG_ONE_SHOT); book.downloaded = true; dataSource.deleteBook(book) .subscribe(new CompletableObserver() {