Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

play default message ringtone android studio

try {
    Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);
    r.play();
} catch (Exception e) {
    e.printStackTrace();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #play #default #message #ringtone #android #studio
ADD COMMENT
Topic
Name
3+6 =