Comments (15)
I'm currently working on a rewrite of the notifications functionality of this plugin which will address this issue in addition to fixing other existing issues and adding more features.
But I'll leave this issue open for now to capture the problem and when my new version is finished, it can be tested against this criteria.
from cordova-plugin-firebasex.
FYI this should be fixed on the dev branch if you want to give that a test.
I'm currently reworking the plugin on dev - when rework is completed, I'll merge to master and release a new major version.
from cordova-plugin-firebasex.
Fixed in v5.0.0
from cordova-plugin-firebasex.
BTW which platform are you seeing this issue on? iOS, Android or both?
from cordova-plugin-firebasex.
In android. Not tested in iOS yet.
from cordova-plugin-firebasex.
Thanks - I have observed the same issue in Android but also not tested this on iOS.
from cordova-plugin-firebasex.
I have tried with dev branch. It does not work accordingly. App loads when the app is not in memory while opening the app and can not find the payload data.
I am really looking forward to your new update for this plugin.
from cordova-plugin-firebasex.
I've just published [email protected]
.
This is a major version that reworks the cloud messaging code and so will resolve this issue.
Please regression test using v5.0.0 of this plugin to confirm.
Note: v5.0.0 makes breaking changes to the plugin API - see the CHANGELOG for details.
You may find it useful to test using the example project which has a built-in FCM messaging client with test messages.
from cordova-plugin-firebasex.
yup it is working just fine.
from cordova-plugin-firebasex.
@dpa99c Please look into this. I am using the firebase cloud function to trigger the notification. I am using firebase-admin. The payload looks something like this.
const payloadMobile = { notification: { title: title, body: body, icon: icon, vibrate: '1', color: "#f7066a", sound: 'my_sound', notification_android_sound: "my_sound", },
data: { patient_id: patient_id, notification_type: notification_type, title: title, body: body, payment_status: payment_status, color: "#f7066a", sound: 'my_sound', notification_android_sound: "my_sound" } }
const responseMobile = await admin.messaging().sendToDevice(uniqueDevicesTokenArrayMobile, payloadMobile)
.
which works fine, I can get the notifications with custom color and custom icons. I am facing issues with the custom sound.
I also tried with the script as you have explained in the docs.
npm run send -- --message=android_notification.json --token="chLm2WNJcDY:APA91bFQxiTOg5aq8wJtVowkHyAIQXpzLYsuZdk00sl4D-iO5kmsuP0DcocEhDJe326d2PG9a0o1_0JQw3p0V2T9Iti5zRbukHNzmGCasxfA__XQd4g9qsxSZHrOKBasJ9qX39ZiA5ZO"
This also works fine except the sound property. Even if I remove the sound property also it gives me default sound here from script run.
<resource-file src="resources/android/raw/my_sound.mp3" target="app/src/main/res/raw/my_sound.mp3" />
this is also there in config.xml and does its job without any issue.
What might be the issue for which I can not make the custom ring tone work? From both firebase function and the sample .json files?
Platform - ionic 3, firebase-x 9.0.1(@latest)
why to open an issue rather fix here. any suggestions will help me a lot. Thanks.
from cordova-plugin-firebasex.
Have you tried to reproduce this by building and running the example project app?
from cordova-plugin-firebasex.
No, I have not tested the app. Let me check it. But if you guessed something for my issue then please suggest.
from cordova-plugin-firebasex.
@dpa99c I have tried and it does not work with the example project project you have suggested. It only plays my default ringtone irrespective of what sound I am giving in the payload.
Please Watch this
While notification build I can see the sound is null. So it is not working.
from cordova-plugin-firebasex.
@dpa99c does it still work for you? It is simply not working with the test app. Could you please check? Android version - 10
from cordova-plugin-firebasex.
For Android 8.0 and above, it's the notification channel that defines the sound, not the sound
key in the FCM message payload (see https://stackoverflow.com/a/54308706/777265)
I've updated the Android Notification Sound and Android Notification Channels sections of the documentation to make this clearer.
from cordova-plugin-firebasex.
Related Issues (20)
- firebasex 16.4.0 caused kotlin version error HOT 1
- com.google.android.recaptcha:recaptcha:18.1.2 security warning HOT 8
- Add rowNonce on signIn w/ Apple response
- Cannot read properties of null (reading '1') HOT 5
- I can't Build my app in Xcode on Apple Silicon
- authenticateUserWithMicrosoft problem due to custom parameter prompt=consent
- setConsent method implementation HOT 2
- Crash in "handleExceptionWithContext" method (rare occurrence)
- Inquiry About Addition of Google Analytics Consent Options for Ad Personalization and User Data HOT 3
- Ionic app not building if I have corodova firbasex installed, if I remove the plugin app will successfully install. HOT 4
- iOS custom or any notification sounds not working - no sounds at all. HOT 1
- Update iOS Firebase SDK component version to v10.23.0, fixes crash on startup HOT 7
- C:\Users\PC\MyApp>cordova run android Checking Java JDK and Android SDK versions ANDROID_HOME=undefined (recommended setting) ANDROID_SDK_ROOT=undefined (DEPRECATED) Using Android SDK: C:\Users\PC\AppData\Local\Android\sdk Subproject Path: CordovaLib Subproject Path: app TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ENOENT') at process.set [as exitCode] (node:internal/bootstrap/node:123:9) at C:\Users\PC\AppData\Roaming\npm\node_modules\cordova\bin\cordova:32:22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) HOT 1
- IOS ITMS-91053 errors HOT 7
- why FirebasePlugin.authenticateUserWithGoogle() returns the idToken can pass Firebase verify ? only can pass Google verify HOT 1
- Notification not received with android 12
- Android13 - Start App without logo on tap to background messaging
- Build fail on Cordova-ios 7.1.0 - Xcode 1.15.2 HOT 5
- FirebasePlugin._onAuthIdTokenChange() fires before device ready, FirebasePlugin undefined HOT 12
- Firebase config setup in Ionic App HOT 1
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 cordova-plugin-firebasex.