Giter Site home page Giter Site logo

Comments (6)

tommag21 avatar tommag21 commented on June 4, 2024 7

Thanks @dnepromell.

I added these lines to my app.gradle file and now my push notifications work:

dependencies {
  implementation "com.google.firebase:firebase-iid:21.1.0"
  implementation "com.google.firebase:firebase-messaging:22.0.0"
  // ...
}

android {
  compileSdkVersion 31
  defaultConfig {
    targetSdkVersion 31
    // ...
  }
  // ...
}

I changed the version of firebase-messaging to 22.0.0 because v. 21.1.0 had a bug where tapping a notification would not launch the app.

from nativescript-plugin-firebase.

Ederagp avatar Ederagp commented on June 4, 2024 1

@dnepromell @hsluis Hello,
Following the firebase documentation indicates this:
Caution: This is a breaking change for apps that use FCM and the deprecated Firebase Instance ID API to manage registration tokens. We strongly recommend [migrating to FCM's token APIs](https://firebase.google.com/docs/projects/manage-installations#fid-iid). If you're unable to migrate to the replacement APIs, add a direct dependency on the firebase-iid library to your build.gradle file.

adding this fixes the error:
implementation "com.google.firebase:firebase-iid:21.1.0"

from nativescript-plugin-firebase.

dnepromell avatar dnepromell commented on June 4, 2024 1

@Ederagp thanks for your help.
Adding this library fixes the crash issue.
But I noticed after it there are no push notifications.

So I also changed "com.google.firebase:firebase-messaging:20.1.0" to "com.google.firebase:firebase-messaging:21.1.0"

And now all works perfectly on Android 12 and the versions below.

from nativescript-plugin-firebase.

hsluis avatar hsluis commented on June 4, 2024

Any updates on this? I am also experience a lot of crashes.

from nativescript-plugin-firebase.

yashpyraj avatar yashpyraj commented on June 4, 2024

Thanks @dnepromell.

I added these lines to my app.gradle file and now my push notifications work:

dependencies {
  implementation "com.google.firebase:firebase-iid:21.1.0"
  implementation "com.google.firebase:firebase-messaging:22.0.0"
  // ...
}

android {
  compileSdkVersion 31
  defaultConfig {
    targetSdkVersion 31
    // ...
  }
  // ...
}

I changed the version of firebase-messaging to 22.0.0 because v. 21.1.0 had a bug where tapping a notification would not launch the app.

after this change android 12 is working fine but old version not getting notification !!!

from nativescript-plugin-firebase.

nikoTM avatar nikoTM commented on June 4, 2024

@yashpyraj which Android versions are you getting issues on? This seems to be working on Android 10,11,12 for me

from nativescript-plugin-firebase.

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.