Open Bebz0r opened 1 year ago
@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 , No, the issue still happens, my remark was just a random finding :) Thanks for updating the docs.
@Bebz0r Have you specified the ChannelId in NotificationRequest?
https://github.com/thudugala/Plugin.LocalNotification/wiki/Notification-with-a-Sound-File
Hi, I have the same problem with multiple audio files. Only the first file works.
@pelka-mariusz can you please attach a sample project?
Hi, MauiApp1.zip
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.