[IMPROVEMENT] Android push notification as a heads-up notification (#2507)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Hendy Irawan 2020-10-31 00:36:29 +07:00 committed by GitHub
parent 6271b885ee
commit 32a0e9be15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -213,9 +213,11 @@ public class CustomPushNotification extends PushNotification {
String CHANNEL_ID = "rocketchatrn_channel_01";
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,
CHANNEL_NAME,
NotificationManager.IMPORTANCE_DEFAULT);
NotificationManager.IMPORTANCE_HIGH);
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.createNotificationChannel(channel);