This commit is contained in:
William Moore 2023-06-15 09:23:43 -05:00
parent c5a063a19a
commit 5458f37dee

View File

@ -102,6 +102,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
.setContentTitle(getString(R.string.fcm_message)) .setContentTitle(getString(R.string.fcm_message))
.setContentText(messageBody) .setContentText(messageBody)
.setAutoCancel(true) .setAutoCancel(true)
.setPriority(NotificationCompat.PRIORITY_MAX)
.setSound(defaultSoundUri) .setSound(defaultSoundUri)
.setContentIntent(pendingIntent) .setContentIntent(pendingIntent)
@ -111,9 +112,10 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel( val channel = NotificationChannel(
channelId, channelId,
"Channel human readable title", "TeaSense",
NotificationManager.IMPORTANCE_DEFAULT, NotificationManager.IMPORTANCE_DEFAULT,
) )
notificationManager.createNotificationChannel(channel) notificationManager.createNotificationChannel(channel)
} }