Android Question [SOLVED] NB6: Demo project doesn't play custom sound - should it?

Sandman

Expert
Licensed User
Longtime User
I've been working to get my app to use NB6, and have found something that surprise me. I can't really tell if this is meant to work or not, there are so many different ways of handling notifications now for Android. I just have to ask the forum for input on this one...

I'm running Erels demo project, and test the Notification with custom sound, all I get is a couple of vibrations - but I don't get the custom sound effect. Is that the expected behaviour for 8.1?
  • The demo project is completely unmodified
  • Device is Nexus 5X with 8.1
  • Before testing I've uninstalled old version of app and cleaned project in IDE
  • All volume settings in phone are max
(If I test with a device running 6.0 it works like a charm.)
 

JordiCP

Expert
Licensed User
Longtime User
Custom sound works correctly with Android 7. Don't own any device with Android 8 to check

Have you tried with other custom sounds? Perhaps ogg instead of mp3 (just for testing)
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Have you tried with other custom sounds? Perhaps ogg instead of mp3

Not really, but as you asked, I did - and no change. Still just vibrations.

And just to be sure, I did look at the notification categories in the phone and I can see that the importance is "High: Make sound", and the actual sound file used is the ogg i provided.

I would love for someone with 8.0 or 8.1 to try the demo project to see if they get sound or not.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
It does work on Android 8. Try to change the channel id and see whether it starts working.

Thanks for the confirmation. And I'm sorry to say changing the channel id did not make it work. I also tried changing to a built-in sound in the app notification settings - same fail there.

So on a hunch (let's be honest - desperation) I decided to restart the phone. The notification with sound instantly worked after that. I deliberately opted to not uninstall first or cleaning project, I just gave it a shot - and it worked. That's the second time in a week I've been forced to restart my phone to get B4A to work with it. I have absolutely no clue if the issue is in B4A or Android 8.1. My gut feeling is the latter, but who knows? Let's just say I'm looking forward to 8.11, or whatever it will be.
 
Upvote 0
Top