mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
17 lines
1.1 KiB
Diff
17 lines
1.1 KiB
Diff
diff --git a/node_modules/react-native-background-actions/android/src/main/java/com/asterinet/react/bgactions/RNBackgroundActionsTask.java b/node_modules/react-native-background-actions/android/src/main/java/com/asterinet/react/bgactions/RNBackgroundActionsTask.java
|
|
index 614f768..0727d65 100644
|
|
--- a/node_modules/react-native-background-actions/android/src/main/java/com/asterinet/react/bgactions/RNBackgroundActionsTask.java
|
|
+++ b/node_modules/react-native-background-actions/android/src/main/java/com/asterinet/react/bgactions/RNBackgroundActionsTask.java
|
|
@@ -83,8 +83,9 @@ final public class RNBackgroundActionsTask extends HeadlessJsTaskService {
|
|
createNotificationChannel(bgOptions.getTaskTitle(), bgOptions.getTaskDesc()); // Necessary creating channel for API 26+
|
|
// Create the notification
|
|
final Notification notification = buildNotification(this, bgOptions);
|
|
-
|
|
- startForeground(SERVICE_NOTIFICATION_ID, notification);
|
|
+ try {
|
|
+ startForeground(SERVICE_NOTIFICATION_ID, notification);
|
|
+ } catch(IllegalStateException e) {}
|
|
return super.onStartCommand(intent, flags, startId);
|
|
}
|
|
|