Skip to content

[firebase_messaging] Support Flutter 1.12 Android embedding #2017

Closed
@creativecreatorormaybenot

Description

@creativecreatorormaybenot

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

FlutterApplication does not exist anymore - see the README section.

Activity

creativecreatorormaybenot

creativecreatorormaybenot commented on Feb 19, 2020

@creativecreatorormaybenot
ContributorAuthor

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

TahaTesser

TahaTesser commented on Feb 19, 2020

@TahaTesser

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

creativecreatorormaybenot

creativecreatorormaybenot commented on Feb 19, 2020

@creativecreatorormaybenot
ContributorAuthor

@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.

added
type: bugSomething isn't working
and removed
blocked: customer-responseWaiting for customer response, e.g. more information was requested.
on Feb 19, 2020
mnesarco

mnesarco commented on Feb 21, 2020

@mnesarco

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

vkammerer commented on Feb 24, 2020

@vkammerer
vkammerer

vkammerer commented on Feb 24, 2020

@vkammerer

@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

KamilSvoboda commented on Mar 4, 2020

@KamilSvoboda

@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

henry2man commented on Mar 12, 2020

@henry2man

@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!

added
impact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)
on Mar 12, 2020
rafaeljustinox

rafaeljustinox commented on Mar 18, 2020

@rafaeljustinox

@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

KamilSvoboda commented on Mar 20, 2020

@KamilSvoboda

@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

Salakar commented on Apr 16, 2021

@Salakar
Member

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

locked and limited conversation to collaborators on May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssue with no recent activityimpact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)plugin: messagingtype: bugSomething isn't workingtype: documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Ehesp@mnesarco@vkammerer@henry2man@Salakar

        Issue actions

          [firebase_messaging] Support Flutter 1.12 Android embedding · Issue #2017 · firebase/flutterfire