Comments (6)
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.
@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.
@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.
Any updates on this? I am also experience a lot of crashes.
from nativescript-plugin-firebase.
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.
@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)
- M1 Issue - FirebaseSDK HOT 4
- Several "session_start" event are created on iOS 15 HOT 1
- ERROR TypeError: firebase.init is not a function.
- AdMob error: TypeError: Cannot set property 'resolve' of undefined
- Class constructor ContentView cannot be invoked without 'new'
- Android App Not working with NS 8.2. HOT 42
- A problem occurred configuring root project 'firebase'.
- microsoft login
- Unable to run new deployment HOT 1
- ion
- Error trying to install @nativescript/firebase
- barcode scanning issue - iPhone 13 Pro and iPhone 13 Pro max
- Cannot read property 'ads' of undefined on NativeScript 8.2.3 HOT 1
- Plugin with id 'com.google.gms.google-services' not found. HOT 13
- SetValue of type Date Error on iOS
- Barcode Scanning issue on native script 8 with native camera control
- Mark this repository as deprecated HOT 1
- Firebase Authentication functions are giving error "No reference found.
- Firebase Messaging crash issue in Android 13 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-plugin-firebase.