Archived
Wrapped notification channel getter method in sdk if statement to fix notifications not arriving on Android 5-7
This commit is contained in:
+2
-2
@@ -10,8 +10,8 @@ android {
|
||||
applicationId "com.denizd.substitutionplan"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 31
|
||||
versionName "2.2.8"
|
||||
versionCode 32
|
||||
versionName "2.2.9"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -211,11 +211,11 @@ internal class DataFetcher(isPlan: Boolean, isMenu: Boolean, isJobService: Boole
|
||||
|
||||
val manager = mContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
HelperFunctions.getNotificationChannel(mContext, prefs)
|
||||
}
|
||||
|
||||
val notification = NotificationCompat.Builder(mContext,
|
||||
HelperFunctions.notificationChannelId
|
||||
)
|
||||
val notification = NotificationCompat.Builder(mContext, HelperFunctions.notificationChannelId)
|
||||
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
|
||||
.setCustomContentView(notificationLayout)
|
||||
.setSmallIcon(R.drawable.ic_avh)
|
||||
|
||||
Reference in New Issue
Block a user