From 3236b1b3357ee0dcbdcc4b1be02f947c7a6ff0ee Mon Sep 17 00:00:00 2001 From: xynngh Date: Sat, 15 Aug 2020 13:22:10 +0400 Subject: [PATCH] Fix initial DB download crash Create notification channels before calling `startForeground(..., notification)` --- .../dummydomain/yetanothercallblocker/NotificationHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java b/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java index 0fc019f..173484f 100644 --- a/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java +++ b/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java @@ -92,6 +92,8 @@ public class NotificationHelper { } public static Notification createServiceNotification(Context context, String title) { + initNotificationChannels(context); + if (title == null) title = context.getString(R.string.notification_background_operation); PendingIntent contentIntent = pendingActivity(context,