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

Discussion in 'Android Questions' started by Sandman, Jun 4, 2018.

  1. Sandman

    Sandman Well-Known Member Licensed 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.)
     
  2. JordiCP

    JordiCP Well-Known Member Licensed 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)
     
  3. Sandman

    Sandman Well-Known Member Licensed User

    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.
     
  4. Sandman

    Sandman Well-Known Member Licensed User

  5. Erel

    Erel Administrator Staff Member Licensed User

    It does work on Android 8. Try to change the channel id and see whether it starts working.
     
    Sandman likes this.
  6. Sandman

    Sandman Well-Known Member Licensed User

    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.
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    This doesn't sound like a B4A issue.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice