有消息來了,讓系統提示音響一下,,獲取系統提示音的方法很簡單。直接上代碼
//提示音
private static void startAlarm(Context context) {
Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
if (notification == null) return;
Ringtone r = RingtoneManager.getRingtone(context, notification);
r.play();
}
就這樣很簡單