Giter Site home page Giter Site logo

Comments (11)

andrehtissot avatar andrehtissot commented on June 3, 2024

I'll investigate. Thanks for pointing it out.

from cordova-plugin-fcm-with-dependecy-updated.

 avatar commented on June 3, 2024

If you can point me in a direction to debug this, I'd be happy to help as well 🙏
Thank you!

from cordova-plugin-fcm-with-dependecy-updated.

 avatar commented on June 3, 2024

If needed:

{
    "registration_ids":
    [
        "<redacted>"
    ],
    "data":
    {
        "show_in_foreground": true,
        "remote": true,
        "link": "<redacted>",
        "guid": "5939821c-415b-4f1e-acfc-0ebce3e58217",
        "NotificationType": "<redacted>",
        "objectId": 1103047868,
        "userId": 0
    },
    "notification":
    {
        "title": "<redacted>",
        "body": "<redacted>",
        "click_action": "FCM_PLUGIN_ACTIVITY",
        "sound": "default",
        "icon": "fcm_push_icon"
    },
    "priority": 10,
    "content_available": true
}
``

from cordova-plugin-fcm-with-dependecy-updated.

andrehtissot avatar andrehtissot commented on June 3, 2024

Funny you have the same click_action defined, just like the example reported in https://stackoverflow.com/questions/56924836/firebase-api-push-doesnt-open-background-app-on-android-device.

Would you be able to avoid sending the click_action key?

from cordova-plugin-fcm-with-dependecy-updated.

 avatar commented on June 3, 2024

@andrehtissot From my understanding, not passing the click_action would just launch the app/bring back the app to the foreground when pressing the push notification, and not lunch the Java FcmPluginActivity, which would not be triggering onNotification in javascript-land.

from cordova-plugin-fcm-with-dependecy-updated.

andrehtissot avatar andrehtissot commented on June 3, 2024

I'll check. 🤔

from cordova-plugin-fcm-with-dependecy-updated.

andrehtissot avatar andrehtissot commented on June 3, 2024

Do you have more than one FCM_PLUGIN_ACTIVITY action in your AndroidManifest.xml? (<action android:name="FCM_PLUGIN_ACTIVITY" />)?

from cordova-plugin-fcm-with-dependecy-updated.

andrehtissot avatar andrehtissot commented on June 3, 2024

There is another way to get this feature.

Hi, I've written a simple implementation, which creates a notification, instead of relying on the click_action given.
Just to check if a solution like this could work in your case (master...andrehtissot:custom-notification-implementation).

So, from the root app directory, execute something like:

cd ..
git clone https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated.git
cd -
cd ../cordova-plugin-fcm-with-dependecy-updated
git checkout custom-notification-implementation
cd -
ionic cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
ionic cordova plugin add ../cordova-plugin-fcm-with-dependecy-updated

And please let me know if the error still happen. Not sure why it does, but this way it might work or bring better error messages. :)

from cordova-plugin-fcm-with-dependecy-updated.

 avatar commented on June 3, 2024

I went with FirebaseX in the meantime as I couldn't spend more time debugging 🙏 I hope I'll find the time to come back to it as it would be better for future iterations if we prove to be using only FCM.

from cordova-plugin-fcm-with-dependecy-updated.

 avatar commented on June 3, 2024

If someone ever run into this issue before though, you are welcome to test first and keep it going forward 🙏 Thank you for your assistance @andrehtissot!

from cordova-plugin-fcm-with-dependecy-updated.

andrehtissot avatar andrehtissot commented on June 3, 2024

No problem, many changes are on the way.

from cordova-plugin-fcm-with-dependecy-updated.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.