unable to set push notification sound in android

后端 未结 3 1043
-上瘾入骨i
-上瘾入骨i 2021-02-14 19:54

I have created the push notification application, I\'m getting the message from GCM services but push notification sound is not working. I need to play sound when I\'m getting n

3条回答
  •  既然无缘
    2021-02-14 20:51

    I use this code:

    Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);
    r.play();
    

提交回复
热议问题