Skip to content

[Question][Android] How to use another plugin that handles FCM notifications (awesome_notifications or firebase_messaging with flutter_local_notifications) #193

@katphlab

Description

@katphlab

Issue Summary

I have integrated the plugin in my app and everything is working as expected. But if I try to send a custom FCM notification to the app, that notification is captured by the plugin and doesn't reach Awesome_notifications plugin. This is mainly to do with this code.

      <service
            android:name="com.twilio.twilio_voice.fcm.VoiceFirebaseMessagingService"
            android:exported="false"
            android:stopWithTask="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

Steps to Reproduce

  1. Use the plugin in any application.
  2. Add the notification handling plugin. In my case awesome_notifications and awesome_notifications_fcm plugin
  3. Send a non-twilio FCM notification using admin_sdk
  4. Log prints D/VoiceFirebaseMessagingService(11750): onMessageReceived: The message was not a valid Twilio Voice SDK payload, continuing...
  5. Awesome_notifications is not triggered

Is there any known method to overcome this limitation?

The workaround that I can think of would be to create another methodChannel that will receive the entire FCM payload and manually trigger the VoiceFirebaseMessagingService.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions