-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android : Issue having multiple sounds #448
Comments
@Bebz0r Can you please attach a sample project? |
Sure, let me create one from scratch, I'll keep you posted |
Here you go, I created a sample project reproducing the issue : https://github.com/Bebz0r/TestSoundNotification |
By the way, from my tests, it seems that (at least on Android), the mp3 files :
|
@Bebz0r Is your issue fixed after fixing bit rate and name of the file ? Documentation updated |
Hi @thudugala , |
@Bebz0r Have you specified the ChannelId in NotificationRequest? https://github.com/thudugala/Plugin.LocalNotification/wiki/Notification-with-a-Sound-File |
Hi, |
@pelka-mariusz can you please attach a sample project? |
Hi, An example project is attached. Not any sound is played. Tested on Pixel 5 emulator - API 34 (Android 14.0 - API 34). |
Hi, did you manage to solve the problem? |
Hi there,
First, thanks a lot about your fantastic work, @thudugala, the functionnality and usage is really simple and straightforward.
However, I can't make multiple sounds to work on Android. One works fine, but if I want to add more, it does not work : only the first one I declare in
.AddAndroid
is played :My files (legit_01.mp3 and legit_02.mp3) are located in Platforms/Android/Resources/raw
I did some tests (uninstalling / reinstalling the app before each test).
Here is how I call my notification. I want to be able to change the sound just by changing "legit_01" to "legit_02" :
And how I create my two channels :
After multiple tests, it's always the first one defined in .AddAndroid that is played, whatever the value of the "Sound" parameter I give to the NotificationRequest. If I switch the AddChannel (e.g. : legit_02 first), it will play legit_02 first, no matter which legit_XX I put in the "Sound" parameter. If I give a random "Sound" parameter though, no sound is played - as if it didn't find the file (which is correct and expected).
Based on the docs, I tried to add Id and Names to the Channels, like so :
But this behaves even worse : the default sound of my device (which is already a custom one) is played.
The text was updated successfully, but these errors were encountered: