NTP-66959 | Add android version check for timer notification (#16760)

This commit is contained in:
Kishan Kumar
2025-06-27 12:17:53 +05:30
committed by GitHub
parent d6313cc090
commit de90afeafc

View File

@@ -8,6 +8,7 @@
package com.navi.common.pushnotification
import android.content.Context
import android.os.Build
import android.os.Bundle
import com.google.firebase.messaging.RemoteMessage
import com.navi.base.utils.isNotNullAndNotEmpty
@@ -28,7 +29,10 @@ object CustomNotificationHandler {
} else {
when (data[NotificationConstants.TEMPLATE_TYPE]) {
TIMER_TEMPLATE -> {
if (remoteMessage.priority == RemoteMessage.PRIORITY_HIGH) {
if (
remoteMessage.priority == RemoteMessage.PRIORITY_HIGH &&
Build.VERSION.SDK_INT <= Build.VERSION_CODES.R
) {
TimerNotificationRenderer.render(context, data)
}
}