tufanv Expert Licensed User Longtime User Mar 2, 2019 #1 Hello, Is it possible to change the sound of notification of firebase notifications or is it handlel by the user ? Thanks
Hello, Is it possible to change the sound of notification of firebase notifications or is it handlel by the user ? Thanks
mangojack Expert Licensed User Longtime User Mar 2, 2019 #2 have you seen this thread .. https://www.b4x.com/android/forum/t...tion-ringtone-in-firebase-notification.97471/ Upvote 0
have you seen this thread .. https://www.b4x.com/android/forum/t...tion-ringtone-in-firebase-notification.97471/
DonManfred Expert Licensed User Longtime User Mar 2, 2019 #3 i just tried it using Android 9 (compiled with targetsdk 26) Code: Copy File.Copy(File.DirAssets,"alert.mp3",Starter.Provider.SharedFolder,"alert.mp3") Log(Starter.Provider.GetFileUri("alert.mp3")) n.CustomSound(Starter.Provider.GetFileUri("alert.mp3")) I does work only after i initialized it with priority HIGH Code: Copy Dim n As NB6 n.Initialize("default", Application.LabelName, "HIGH").AutoCancel(True) It does work if my app is in foreground. It does work if my app is in background and just the FirebaseMessaging service get run and show the notification. Upvote 0
i just tried it using Android 9 (compiled with targetsdk 26) Code: Copy File.Copy(File.DirAssets,"alert.mp3",Starter.Provider.SharedFolder,"alert.mp3") Log(Starter.Provider.GetFileUri("alert.mp3")) n.CustomSound(Starter.Provider.GetFileUri("alert.mp3")) I does work only after i initialized it with priority HIGH Code: Copy Dim n As NB6 n.Initialize("default", Application.LabelName, "HIGH").AutoCancel(True) It does work if my app is in foreground. It does work if my app is in background and just the FirebaseMessaging service get run and show the notification.
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2019 #4 tufanv said: Is it possible to change the sound of notification of firebase notifications or is it handlel by the user ? Click to expand... There is no such thing: sound notification of firebase notifications. The firebase push notification causes your app to start and raise the fm_MessageArrived event. You can then do whatever you like. See NB6 for custom sounds playback. Upvote 0
tufanv said: Is it possible to change the sound of notification of firebase notifications or is it handlel by the user ? Click to expand... There is no such thing: sound notification of firebase notifications. The firebase push notification causes your app to start and raise the fm_MessageArrived event. You can then do whatever you like. See NB6 for custom sounds playback.