Android Question GCM Push Notification playing sound

Discussion in 'Android Questions' started by imbault, May 15, 2015.

  1. imbault

    imbault Well-Known Member Licensed User

    Hi, is there a way to play a sound you embedded in your app when you receive a notification, other than standard Android notification sound?
    Thanks
     
  2. imbault

    imbault Well-Known Member Licensed User

    I got that from stackoverflow

    @Erel , can we do something in B4a?

    Code:
    notification.sound =Uri.parse("android.resource://"+ getPackageName()+"/"+R.raw.pop);
    notification.defaults |=Notification.DEFAULT_VIBRATE;
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. imbault

    imbault Well-Known Member Licensed User

    Thank you Erel, I'll will try with this library.
    Regards
     
  5. imbault

    imbault Well-Known Member Licensed User

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