如何播放“正面”警报声?我知道怎么玩默认的...
Ringtone ringtone = RingtoneManager.getRingtone(getApplicationContext(), RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM));
if (ringtone != null) {
ringtone.play();
}
编辑:尝试了以下但光标只返回相同的uri???
RingtoneManager rm = new RingtoneManager(getApplicationContext());
rm.setType(RingtoneManager.TYPE_ALARM);
Cursor c = rm.getCursor();
c.moveToFirst();
if (!c.isAfterLast()) {
do {
int uriIndex = c.getInt(RingtoneManager.URI_COLUMN_INDEX);
Uri ring = rm.getRingtoneUri(uriIndex);
Log.d("TC", ring.toString());
} while (c.moveToNext());
}