我正在实现以下通知功能。默认的警报声音正常播放,但仅播放一次。我想要的是在注册点击之前反复播放它。
setSound的第二个参数没有产生任何效果。请帮忙!
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("I Am Fine")
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(NOTIFICATION_MESSAGE))
.setContentText(NOTIFICATION_MESSAGE)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE);
Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
mBuilder.setSound(alarmSound,AudioManager.STREAM_MUSIC);
setSound的第二个参数没有产生任何效果。请帮忙!