Check sdk version.
@@ -2,7 +2,6 @@ package com.backendless.push;
import android.app.AlarmManager;
import android.app.Notification;
-import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -207,10 +206,11 @@ public class BackendlessPushService extends JobIntentService implements PushRece
if( androidPushTemplate.getName() == null || androidPushTemplate.getName().isEmpty() )
androidPushTemplate.setName( BackendlessPushService.IMMEDIATE_MESSAGE );
- NotificationChannel notificationChannel = PushTemplateHelper.getNotificationChannel( context, androidPushTemplate.getName() );
-
- if( notificationChannel == null )
+ if( android.os.Build.VERSION.SDK_INT > 25 )
+ {
+ if( PushTemplateHelper.getNotificationChannel( context, androidPushTemplate.getName() ) == null )
androidPushTemplate.setName( BackendlessPushService.IMMEDIATE_MESSAGE );
+ }
Notification notification = PushTemplateHelper.convertFromTemplate( context, androidPushTemplate, message, messageId, contentTitle, summarySubText, notificationId );
PushTemplateHelper.showNotification( context, notification, androidPushTemplate.getName(), notificationId );
