D dieterp Active Member Licensed User Longtime User Feb 5, 2015 #1 I am using the Notification Builder Library developed by @barx to handle the incoming notifications to my device. I am however having a problem with the CustomSound functionality. When I directly copy a 'notification.ogg' file to the 'Notifications' folder on my device, it works fine when I use the code Notification2.CustomSound = "file:///sdcard/notifications/notification.ogg" However, when I copy the 'notification.ogg' file to the File.DirDefaultExternal folder, I cannot seem to play it from that folder. I've tried several paths (using file:///) but I just can't seem to get it to play. Will it not work from the File.DirDefaultExternal folder? I've posted the question in the Notification Builder forum, but @barx also doesn't seem to know if it would work or not. Anyone have any ideas for me? Regards
I am using the Notification Builder Library developed by @barx to handle the incoming notifications to my device. I am however having a problem with the CustomSound functionality. When I directly copy a 'notification.ogg' file to the 'Notifications' folder on my device, it works fine when I use the code Notification2.CustomSound = "file:///sdcard/notifications/notification.ogg" However, when I copy the 'notification.ogg' file to the File.DirDefaultExternal folder, I cannot seem to play it from that folder. I've tried several paths (using file:///) but I just can't seem to get it to play. Will it not work from the File.DirDefaultExternal folder? I've posted the question in the Notification Builder forum, but @barx also doesn't seem to know if it would work or not. Anyone have any ideas for me? Regards
Dieter Baumgartner Member Licensed User Longtime User Aug 17, 2016 #2 I can't get it to work either with the File.DirDefaultExternal folder. Any news how to play the customSound from this folder ? Upvote 0
I can't get it to work either with the File.DirDefaultExternal folder. Any news how to play the customSound from this folder ?
D dieterp Active Member Licensed User Longtime User Aug 17, 2016 #3 It sounds like this is a problem that only affects guys called Dieter! I just ended up using the SoundPool library, so I play the notification file when the notification comes through Code: Dim SP As SoundPool Dim snd_file As Int SP.Initialize(1) snd_file = SP.Load(File.DirAssets,"my_sound.ogg") Upvote 0
It sounds like this is a problem that only affects guys called Dieter! I just ended up using the SoundPool library, so I play the notification file when the notification comes through Code: Dim SP As SoundPool Dim snd_file As Int SP.Initialize(1) snd_file = SP.Load(File.DirAssets,"my_sound.ogg")
Dieter Baumgartner Member Licensed User Longtime User Aug 18, 2016 #4 Thank you very much, this works. Sometimes the easiest way is the best, but i was so fixed to get the Notification Builder custom sound running, that i didn't see the easy way !! Upvote 0
Thank you very much, this works. Sometimes the easiest way is the best, but i was so fixed to get the Notification Builder custom sound running, that i didn't see the easy way !!