[IMPROVEMENT] Android push notification as a heads-up notification (#2507)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
6271b885ee
commit
32a0e9be15
|
@ -213,9 +213,11 @@ public class CustomPushNotification extends PushNotification {
|
||||||
String CHANNEL_ID = "rocketchatrn_channel_01";
|
String CHANNEL_ID = "rocketchatrn_channel_01";
|
||||||
String CHANNEL_NAME = "All";
|
String CHANNEL_NAME = "All";
|
||||||
|
|
||||||
|
// User-visible importance level: Urgent - Makes a sound and appears as a heads-up notification
|
||||||
|
// https://developer.android.com/training/notify-user/channels#importance
|
||||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
|
NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
|
||||||
CHANNEL_NAME,
|
CHANNEL_NAME,
|
||||||
NotificationManager.IMPORTANCE_DEFAULT);
|
NotificationManager.IMPORTANCE_HIGH);
|
||||||
|
|
||||||
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
|
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
notificationManager.createNotificationChannel(channel);
|
notificationManager.createNotificationChannel(channel);
|
||||||
|
|
Loading…
Reference in New Issue