Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
katphlab opened this issue Nov 8, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@katphlab
Copy link

katphlab commented Nov 8, 2023

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.

@katphlab katphlab changed the title [Question] How to use another plugin that handles FCM notifications (awesome_notifications or firebase_messaging with flutter_local_notifications) [Question][Android] How to use another plugin that handles FCM notifications (awesome_notifications or firebase_messaging with flutter_local_notifications) Nov 8, 2023
@cybex-dev cybex-dev self-assigned this Nov 8, 2023
@cybex-dev
Copy link
Owner

Hi @katphlab

Thank you for bringing this to my attention - I'll investigate and report back.

@cybex-dev cybex-dev added the bug Something isn't working label Nov 10, 2023
@katphlab
Copy link
Author

I have created a fix for this by implementing the showBackgroundCallUI function and using the twilio payload to call the Twilio SDK.
#212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants