You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to work fine when called in response to some UI event while my app is running. However, I am integrating with flutter_background_geolocation plugin and would like to display a notification when a geofence event occurs. I'm using
bg.BackgroundGeolocation.registerHeadlessTask(headlessTask). However, if my headlessTask method calls the above showNotification method, it fails and logs the error:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method initialize on channel dexterous.com/flutter/local_notifications)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:154:7) #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12) #2 AndroidFlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/platform_flutter_local_notifications.dart:67:27) #3 FlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/flutter_local_notifications_plugin.dart:97:13) #4 NotificationsService.showNotification (package:flutter_tic_tac_toe/services/notifications.dart:14:43) #5 headlessTask (package:flutter_tic_tac_toe/main.dart:98:26)
The text was updated successfully, but these errors were encountered:
I use the following class to display a notification.
This seems to work fine when called in response to some UI event while my app is running. However, I am integrating with flutter_background_geolocation plugin and would like to display a notification when a geofence event occurs. I'm using
bg.BackgroundGeolocation.registerHeadlessTask(headlessTask). However, if my headlessTask method calls the above showNotification method, it fails and logs the error:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method initialize on channel dexterous.com/flutter/local_notifications)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:154:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
#2 AndroidFlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/platform_flutter_local_notifications.dart:67:27)
#3 FlutterLocalNotificationsPlugin.initialize (package:flutter_local_notifications/src/flutter_local_notifications_plugin.dart:97:13)
#4 NotificationsService.showNotification (package:flutter_tic_tac_toe/services/notifications.dart:14:43)
#5 headlessTask (package:flutter_tic_tac_toe/main.dart:98:26)
The text was updated successfully, but these errors were encountered: