flutter-android-background
flutter-android-background copied to clipboard
Not listen notification when i use notifications: ^2.0.1
Give an error when i use **notifications: ^2.0.1 ** with it
the exception is
MissingPluginException(No implementation found for method listen on channel notifications)
But in others app when in use notifications: ^2.0.1 this listen the notification. @ppicas can you please tell me why this is happening.
Hi Ubaid, probably this is because the new Dart instance running in the BackgroundService
don't have the MethodChannel
registered that is used by notifications
package.
You will have to find a way to register the plugins also in the background Dart instance. For instace calling AppPluginRegistrant.registerWith()
method when the new instance is created at BackgroundService
.
(Sorry but I can't provide the code because I don't have time for it)