aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-01-18 11:58:11 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-01-18 11:58:11 +0100
commitd453e5501b82e1281adf5f047ecabbf0df82d696 (patch)
tree20a72e35f1de6f2bd146d4895ee14fef6cdec23a /src/main/java/eu/siacs/conversations
parent78ac43cfa21d0a012bd3c5f30fc7534f2af2e9f2 (diff)
parent99989cd1d52bda9016d21df8f1d876c569498135 (diff)
Merge pull request #899 from SamWhited/api21_notifications
Add some Android 21 notification features
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index 8c3aff16..4355dba0 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -203,6 +203,10 @@ public class NotificationService {
mBuilder.setSound(Uri.parse(ringtone));
}
}
+ if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ mBuilder.setCategory(Notification.CATEGORY_MESSAGE);
+ mBuilder.setColor(mXmppConnectionService.getResources().getColor(R.color.primary));
+ }
mBuilder.setSmallIcon(R.drawable.ic_notification);
mBuilder.setDeleteIntent(createDeleteIntent());
mBuilder.setLights(0xffffffff, 2000, 4000);