From e9b82d2c36cd4f546c30b5964d762972f920042a Mon Sep 17 00:00:00 2001 From: avm99963 Date: Tue, 15 Sep 2020 20:29:42 +0200 Subject: Add the option to display MediaStyle notifications Android now has the capability of displaying MediaStyle notifications which are better aligned with the Material Design standards and blend better into the OS than custom notifications. This commit adds an option in the Playback section to show notifications using the MediaStyle style. --- app/src/main/res/xml/settings_playback.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/src/main/res/xml/settings_playback.xml') diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index fb3501f0..f2e76b4c 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -46,6 +46,12 @@ android:key="headsUpNotification" android:defaultValue="false"/> + + Date: Mon, 21 Sep 2020 20:07:46 -0700 Subject: Change media notification to default to system style --- app/src/main/java/github/daneren2005/dsub/service/DownloadService.java | 2 +- app/src/main/res/xml/settings_playback.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/res/xml/settings_playback.xml') diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index 5c077b1e..e86899b1 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1520,7 +1520,7 @@ public class DownloadService extends Service { } SharedPreferences prefs = Util.getPreferences(this); - boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, false) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; + boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, true) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; if (show) { Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index f2e76b4c..fd6a7dda 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -50,7 +50,7 @@ android:title="@string/settings.media_style_notification" android:summary="@string/settings.media_style_notification_summary" android:key="mediaStyleNotification" - android:defaultValue="false"/> + android:defaultValue="true"/>