flutter_notification_listener icon indicating copy to clipboard operation
flutter_notification_listener copied to clipboard

Can't get notifications in the background

Open chuquoctuan2704 opened this issue 1 year ago • 7 comments

I have a message: "Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_notification_listener/bg_method. Response ID: " Screenshot 2023-06-06 at 21 22 59 Background service is already running, above error may be caused by flutterEnginer, please check again for me. If everything is correct give me an example of reading notifications in the background and sending to flutter. Thanks

chuquoctuan2704 avatar Jun 06 '23 14:06 chuquoctuan2704

what if you restart the app, does this works fine?

jiusanzhou avatar Jun 08 '23 11:06 jiusanzhou

restarting the app also doesn't get notifications in the background.

chuquoctuan2704 avatar Jun 08 '23 13:06 chuquoctuan2704

Still facing this issue. main.dart: https://github.com/prijindal/your_notifications/blob/097b6760e8a381d04f5c2b84f0d80216f89d078d/lib/main.dart

AndroidManifest.xml: https://github.com/prijindal/your_notifications/blob/097b6760e8a381d04f5c2b84f0d80216f89d078d/android/app/src/main/AndroidManifest.xml

prijindal avatar Feb 11 '24 09:02 prijindal

The same issue

W/FlutterJNI(20647): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_notification_listener/bg_method. Response ID: 13 D/NotificationsListenerService(20647): send event to flutter side immediately!

ProFive avatar Feb 29 '24 03:02 ProFive

any update?

Matsuo32 avatar Mar 04 '24 09:03 Matsuo32

hi @jiusanzhou , if you have the path to how to implement this ,please tell i will try to make it work . As i need this soo much.

dhruvpatidar359 avatar Mar 30 '24 03:03 dhruvpatidar359

Hi all, I have raised a fix for this issue. Please have a look : https://github.com/jiusanzhou/flutter_notification_listener/pull/46

Droyder7 avatar Apr 14 '24 15:04 Droyder7