Closed
Description
The plugin needs to integrate the Android embedding changes in Flutter 1.12.
FlutterApplication
does not exist anymore - see the README
section.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
creativecreatorormaybenot commentedon Feb 19, 2020
@TahaTesser I think that this is not only documentation because the functionality of the plugin depends on this.
TahaTesser commentedon Feb 19, 2020
Hi @creativecreatorormaybenot
Please explain it detail what's the issue/change you looking for?
To better the address the issue
Thank you
creativecreatorormaybenot commentedon 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.mnesarco commentedon Feb 21, 2020
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 commentedon Feb 24, 2020
@mnesarco you may find some help at https://stackoverflow.com/a/59490722
vkammerer commentedon Feb 24, 2020
@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 commentedon Mar 4, 2020
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 commentedon Mar 12, 2020
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!
rafaeljustinox commentedon Mar 18, 2020
Me too! I was facing the same problem but I solved following this steps! Thanks bro!
KamilSvoboda commentedon Mar 20, 2020
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 commentedon 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