Merge pull request #899 from SamWhited/api21_notifications

Add some Android 21 notification features
This commit is contained in:
Daniel Gultsch 2015-01-18 11:58:11 +01:00
commit d453e5501b
1 changed files with 4 additions and 0 deletions

View File

@ -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);