From de90afeafc679254245046917ada3ba76af4ed37 Mon Sep 17 00:00:00 2001 From: Kishan Kumar Date: Fri, 27 Jun 2025 12:17:53 +0530 Subject: [PATCH] NTP-66959 | Add android version check for timer notification (#16760) --- .../common/pushnotification/CustomNotificationHandler.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/navi-common/src/main/java/com/navi/common/pushnotification/CustomNotificationHandler.kt b/android/navi-common/src/main/java/com/navi/common/pushnotification/CustomNotificationHandler.kt index 8f3c11f9e9..fab272cd8c 100644 --- a/android/navi-common/src/main/java/com/navi/common/pushnotification/CustomNotificationHandler.kt +++ b/android/navi-common/src/main/java/com/navi/common/pushnotification/CustomNotificationHandler.kt @@ -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) } }