flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

Question: Need help in understanding flutter_local_notifications and firebase_messaging integration

Open becjit opened this issue 1 year ago • 2 comments

Hi, I am planning to integrate flutter_local_notifications and firebase_messaging. I have gone through multiple issues/notes on the same topic and have some confusions around FirebaseAppDelegateProxyEnabled.

Confusion #1 : https://firebase.flutter.dev/docs/messaging/overview clearly calls out FirebaseAppDelegateProxyEnabled to be set to true while in other references that talks about integrating with flutter_local_notifications the direction is to set it to false

Confusion #2 In this https://firebase.flutter.dev/docs/messaging/notifications page there are steps to integrate with flutter_local_notifications in android but not with ios

Confusion #3 In @MaikuB 's integration example https://github.com/MaikuB/flutter_firebase_local_notifications_examples/blob/updateKotlinSwift/kotlin_swift/ios/Runner/Info.plist for kotlin swift the FirebaseAppDelegateProxyEnabled is not present in info.plist

while in https://github.com/MaikuB/flutter_firebase_local_notifications_examples/blob/updateKotlinSwift/java_objc/ios/Runner/Info.plist is set to false

Confusion #4 As per https://github.com/firebase/flutterfire/discussions/6113 it looks like it is not possible to intercept 'notification' at all. Any integration would only with 'data' messages only

I would appreciate your help in clearing these doubts

becjit avatar Jan 02 '24 05:01 becjit

I would say your best bet is to actually go try to implement to go confirm. If you need more guidance then suggest going to places like Stack Overflow, Discord or Slack. Will mention a few of things with what I know though

  • my own example is purely for my own exploration so is why it's not called out in this plugin's readme. If you're going to look at existing apps, you should be mindful of how old the code is and versions of libraries used. I'm mentioning this as the repo is quite old
  • I'd be more inclined to think the docs to do with FCM plugin are more up to date so would suggest referring to what they have instead. If they have inconsistencies in their own docs then that's not something I can explain
  • Since you mentioned https://github.com/firebase/flutterfire/discussions/6113, want to mention you will need to figure if you really need to use this plugin with FCM or not to begin with by understanding how the FCM plugin works and if that is sufficient for your purposes

MaikuB avatar Jan 19 '24 10:01 MaikuB

Thanks, I got it working. Thanks for your time

On Fri, 19 Jan 2024 at 3:59 PM, Michael Bui @.***> wrote:

I would say your best bet is to actually go try to implement to go confirm. If you need more guidance then suggest going to places like Stack Overflow, Discord or Slack. Will mention a few of things with what I know though

  • my own example is purely for my own exploration so is why it's not called out in this plugin's readme. If you're going to look at existing apps, you should be mindful of how old the code is and versions of libraries used. I'm mentioning this as the repo is quite old
  • I'd be more inclined to think the docs to do with FCM plugin are more up to date so would suggest referring to what they have instead. If they have inconsistencies in their own docs then that's not something I can explain
  • Since you mentioned firebase/flutterfire#6113 https://github.com/firebase/flutterfire/discussions/6113, want to mention you will need to figure if you really need to use this plugin with FCM or not to begin with by understanding how the FCM plugin works and if that is sufficient for your purposes

— Reply to this email directly, view it on GitHub https://github.com/MaikuB/flutter_local_notifications/issues/2198#issuecomment-1900147055, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ4MLRAY3HRLTVBA7LRPQDYPJDI5AVCNFSM6AAAAABBJSCOCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQGE2DOMBVGU . You are receiving this because you authored the thread.Message ID: @.***>

becjit avatar Jan 19 '24 12:01 becjit

Thanks will close this but out of interest, what was the approach that worked for you?

MaikuB avatar Feb 06 '24 09:02 MaikuB