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

[firebase_messaging] Support Flutter 1.12 Android embedding #2017

Closed
creativecreatorormaybenot opened this issue Feb 18, 2020 · 11 comments
Closed
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) plugin: messaging Stale Issue with no recent activity type: bug Something isn't working type: documentation Improvements or additions to documentation

Comments

@creativecreatorormaybenot
Copy link
Contributor

creativecreatorormaybenot commented Feb 18, 2020

The plugin needs to integrate the Android embedding changes in Flutter 1.12.

FlutterApplication does not exist anymore - see the README section.

@TahaTesser TahaTesser added the type: documentation Improvements or additions to documentation label Feb 19, 2020
@creativecreatorormaybenot
Copy link
Contributor Author

@TahaTesser I think that this is not only documentation because the functionality of the plugin depends on this.

@TahaTesser
Copy link

Hi @creativecreatorormaybenot
Please explain it detail what's the issue/change you looking for?
To better the address the issue
Thank you

@TahaTesser TahaTesser added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Feb 19, 2020
@creativecreatorormaybenot
Copy link
Contributor Author

creativecreatorormaybenot commented Feb 19, 2020

@TahaTesser See #1646.

I opened this to show that there are problems with FlutterApplication in addition to what the other issues state. I do not know how to fix it right now.

@TahaTesser TahaTesser added type: bug Something isn't working and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 19, 2020
@mnesarco
Copy link

Hi, I just upgraded my App to the new Flutter 1.12 API (embedding) and now I don't know how to keep firebase_messaging working :(

@vkammerer
Copy link

@mnesarco you may find some help at https://stackoverflow.com/a/59490722

@vkammerer
Copy link

@amirh @kroikie Should the migration of the firebase_messaging plugin to Android embedding v2 take inspiration from the work done by @bkonyi in flutter/plugins#2193 ?
It looks like his abstraction of a BackgroundExecutor could be quite useful when executing firebase messaging in the background: https://github.com/flutter/plugins/blob/master/packages/android_alarm_manager/android/src/main/java/io/flutter/plugins/androidalarmmanager/FlutterBackgroundExecutor.java .

@KamilSvoboda
Copy link

KamilSvoboda commented Mar 4, 2020

@mnesarco you may find some help at https://stackoverflow.com/a/59490722

But this approach is not compatible with writing custom platform-specific code. As is described on flutter.dev - The FlutterEngine is needed to set setMethodCallHandler on MethodChannel.

@henry2man
Copy link

henry2man commented Mar 12, 2020

@mnesarco you may find some help at https://stackoverflow.com/a/59490722

I followed the tutorial for Android ( https://pub.dev/packages/firebase_messaging ) just without the optional section Optionally handle background messages. At that point I had the same issue as per #248.

At that point I used the answer pointed by @vkammerer (https://stackoverflow.com/a/59490722) and then notifications worked great :)

Kudos!

@TahaTesser TahaTesser added the impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) label Mar 12, 2020
@rafaeljustinox
Copy link

@mnesarco you may find some help at https://stackoverflow.com/a/59490722

I followed the tutorial for Android ( https://pub.dev/packages/firebase_messaging ) just without the optional section Optionally handle background messages. At that point I had the same issue as per #248.

At that point I used the answer pointed by @vkammerer (https://stackoverflow.com/a/59490722) and then notifications worked great :)

Kudos!

Me too! I was facing the same problem but I solved following this steps! Thanks bro!

@KamilSvoboda
Copy link

@mnesarco you may find some help at https://stackoverflow.com/a/59490722

I followed the tutorial for Android ( https://pub.dev/packages/firebase_messaging ) just without the optional section Optionally handle background messages. At that point I had the same issue as per #248.
At that point I used the answer pointed by @vkammerer (https://stackoverflow.com/a/59490722) and then notifications worked great :)
Kudos!

Me too! I was facing the same problem but I solved following this steps! Thanks bro!

Unfortunately not for me. This procedure cannot be combined with the use of PlatformChannel, which must be registered in method configureFlutterEngine in FlutterActivity.

For the above procedure to work, it is necessary to remove method configureFlutterEngine from the FlutterActivity. Unfortunately AFAIK it is not possible to register PlatformChannel in FlutterApplication!

@Salakar
Copy link
Member

Salakar commented Apr 16, 2021

I don't believe this issue is relevant anymore with v2 embedding so am closing in favour of checking out the latest messaging version which has since this issue was created been heavily reworked to improve it along with detailed documentation: https://firebase.flutter.dev/docs/messaging/overview

Thanks

@Salakar Salakar closed this as completed Apr 16, 2021
@firebase firebase locked and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) plugin: messaging Stale Issue with no recent activity type: bug Something isn't working type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

9 participants