我想使用TYPE_RINGTONE,但如果该歌曲很长,我想用一个按钮停止它。我怎么能这样做?感谢。
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setContentTitle(getString(R.string.app_name));
builder.setTicker(getString(R.string.notification_text));
builder.setContentText(getString(R.string.notification_text));
builder.setSmallIcon(R.drawable.ic_monocromogordo);
builder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE));
builder.build();