Ionic 3, firebase push notification custom sound not working - firebase

I have tried to implement custom sound for push notification in ionic 3.
Everything works fine, like ,push notification icon, phone vibration. Only the custom sound not working, i have put it in - platform/android/res/raw, in mp3 format.
However, some of android version (like version 8) has the custom sound when push notification comes, but the other version (like 9,10) have no sound for push notification. But the vibration works well.
Please help me how to do it for all android version as well as ios.
Thanks in advance.

Related

Is there a way to show firebase notifications in the foreground on android and ios using ionic?

I solved this problem in android studio by creating my custom notification handler and just inputing the data firebase sends. But I can't seem to find a way/guide/tutorial to do so with ionic.
Is there a way to do that or do is it only possible to show notifications when app in background?
I've tried every guide I found online but most of them just do nothing or the notification is just showed when app in background.
Thanks
Update: 23 July 2019
The reworked implementation has been released as cordova-plugin-firebasex#6.0.0.
See the documentation for more info: https://github.com/dpa99c/cordova-plugin-firebase
Original answer
This is something I'm working on in cordova-plugin-firebasex (my fork of cordova-plugin-firebase).
Currently it's a work in progress (first draft implementation done for Android on the dev branch) and I'm working on the iOS implementation.
You can test it out using the dev branch of my test harness project.
Hoping to have a releasable version in the next week or so.

Firebase not reporting android activity

We are using Firebase for push notifications for Android and iOS, and all the notifications are working perfectly.
But when I log into firebase, and try to see the activity in “Streamview”, I see only iOS activity, and nothing for Android.
I do see the activity in Cloud messaging’s Report section, for both iOS and Android.
The application we have built is built using Xamarin forms.
One thing to note from the Firebase console is that it doesn’t appear as though the console recognizes that SDK setup was fully complete.
When going into the link where it says “Continue SDK Setup”.
Finally, when proceeding to step #4 it tries to verify that there has been communication between the app and Google’s servers and it doesn’t seem to find anything and it just sits there looking.
Notifications appear to work, but the app just doesn’t seem to be registering as being used under the Android side.
Any pointers in this direction will be very helpful.
i don't have any idea what is wrong here.
I want to watch complete report of my push notifications sending count, for both platform Android and iOS. but i am getting only iOS report in stream view tab not for Android.
I made the comment above and now I have found an answer, at least for my situation. I had added Xamarin.Firebase.Core to the PCL project as the documentation suggests. Later I saw documentation for Android Java that showed Firebase Core being added to the gradle file at the app level. So I added Xamarin.Firebase.Core NuGet package to the Android project also and now I can see data for Android in the Firebase Console.

Here Tracking could not add a device

I register to the 90 trial period with here tracking. I try to register a new device through app.tracking.here.com but after waiting 30 seconds I always get the message couldn't add the device.
Thank You
I tried from Android: default browser, Chrome and Firefox, but I always get the same error. I am using Android 8.0
Screenshot: Add a device from Android browser
You have to access the website from your Android device to get device id. It wont work if you are trying from a non Android device eg: computer, laptop etc.
You can read more details on using the tracker app here: developer.here.com/blog/introducing-here-tracking
Update:
If mobile browser still not helping you, then download the HERE Tracker app from the Google Play store to start out creating some test data. In the web app, use the Device Management screen to add a new device.
This issue has been fixed and is working now for Android devices

Ionic push notification for ios using FCM

I am trying to send push notification on my iOS device with the help of FCM and ionic 3. But I'm unable to get on my device, for android it is working fine, but for iOS its not working. I'm getting device token for iOS and I've enabled push notification from xcode also.
Is there any other configuration, which I'm missing between iOS and FCM?
Yes.
Steps for ios FCM Integration:
Add the GoogleService-info.plist file in to the root folder of your app.
Add the plugin to your app following this link : https://ionicframework.com/docs/native/fcm/
Write the necessary code
Run command in terminal/cmd 'ionic cordova prepare'
Open Xcode and allow the code to be indexed.
Click on 'show project navigator' on the extreme left hand side below run button. Check the Resources Folder and click on GoogleService-info.plist. If it is empty, delete it and manually place the file again in that folder by dragging and dropping.
Under Capabilities, ON push notifications and ON background modes> remote notifications
8 Upload p8 file on firebase console.
9 and you're done! Test your notification :)
Note: Don't forget to use actual device to test this feature. iOS Simulator doesn't support notifications.
App Crash Issue: Make sure that platforms/ios/MyApp/Resources/Resources/GoogleService-Info.plist and platforms/ios/MyApp/Resources/GoogleService-Info.plist
are same and complete. An incomplete file on any of the above paths can lead to crashing of the app.

FCM/GCM for electron APP

I have been using FCM/GCM to send notifications to Chrome App, Chrome Extension, Android APP.
But, may I know how can I send notifications to an electron APP from FCM/GCM. I browsed through a lot of websites but did not find anything related to it.
PS: I don't worry about how the notifications are displayed. I just want the notification payload to be received by the electron app.
Thanks in advance.
There's nothing available out of the box with Electron but there is a Node package available here: https://www.npmjs.com/package/electron-push-receiver
There's no boilerplate code available for using this package yet, but there is an open issue in the associated GitHub project requesting a working example: https://github.com/MatthieuLemoine/electron-push-receiver/issues/8

Resources