'connect to channel while the app is off in flutter

I'm using pusher package (pusher_client) to send a notification.

It works great when the app is open or when it is put in the background,

It works as expected, One issue that I'm facing is I'm not able to receive the notifications when the app is not in the background or when the app is cleared from the background, Any possible solutions?

when I used flutter workmanager package I get this error when I schedule the connect to the pusher channel

"Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++." After start a background service and closes the app"

any Idea?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source