[Android] Set categories to notifications

Geoffrey Métais git at videolan.org
Tue Aug 22 14:53:42 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Aug 22 11:02:09 2017 +0200| [67b84a2ea3653a80192712e62607edc728e70f6d] | committer: Geoffrey Métais

Set categories to notifications

> https://code.videolan.org/videolan/vlc-android/commit/67b84a2ea3653a80192712e62607edc728e70f6d
---

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 1 +
 vlc-android/src/org/videolan/vlc/PlaybackService.java     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 446526d25..e971b7060 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -277,6 +277,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                             .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
                             .setContentTitle(getString(R.string.ml_scanning))
                             .setAutoCancel(false)
+                            .setCategory(NotificationCompat.CATEGORY_PROGRESS)
                             .setOngoing(true);
                 }
                 String progressText = sb.toString();
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index ba8b13e1f..5766adf40 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -919,6 +919,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                                     .setTicker(title + " - " + artist)
                                     .setAutoCancel(!playing)
                                     .setOngoing(playing)
+                                    .setCategory(NotificationCompat.CATEGORY_SERVICE)
                                     .setDeleteIntent(piStop);
 
                         builder.setContentIntent(getSessionPendingIntent());



More information about the Android mailing list