jiusanzhou / flutter_notification_listener

Flutter plugin to listen for and interact with all incoming notifications for Android. 一个监听手机通知的插件。
https://pub.dev/packages/flutter_notification_listener
Other
40 stars 49 forks source link

Notification are received on in native code (android) but the onData is never called in flutter #61

Open AbderraoufKhodja opened 1 week ago

AbderraoufKhodja commented 1 week ago

After adding flutter_notification_listener, on debug mode, I only receive notifications events logs but the onData function is never called. I am using the example code from the repo.

Log:

D/NotificationsListenerService( 9982): send notification event: {infoText=null, flags=17, canTap=true, title=*******, subText=null, uid=10293, showWhen=true, largeIcon=[B@2aa2d9f, package_name=************, text=************;, id=-132088129, _id=80e9ac71d00c7, isGroup=false, actions=null, channelId=message_channel_new_id, key=0|*********|-132088129|null|10293, timestamp=1731844584591}

It seems that the method mBackgroundChannel.invokeMethod("sink_event", listOf(callbackHandle, evt.data) call from FlutterNotificationListenerPlugin.kt is failing.