Code example for Ringtone

Methods: play, setStreamType

0
        if (ringtone == null) {
            return; 
        } 
 
        // TODO: AnnouncifySettings using ContentProvider 
        ringtone.setStreamType(new AnnouncifySettings(this).getStream());
        ringtone.play();
    } 
 
    protected void stopRingtone() { 
        if (ringtone != null) {
            ringtone.stop();
            ringtone = null;
        } 
    } 
}