[英]Android Notification Sound Limit
I have a problem for notification with sound duration. 我有声音持续时间通知的问题。
I send a location notification with sound. 我发送带有声音的位置通知。 My notification sound duration is 5 minutes, but Android not playing 5 minutes.
我的通知声音持续时间为5分钟,但Android不能播放5分钟。 Why?
为什么? What is the duration limit?
持续时间限制是多少? Or I can remove sound duration limit?
或者我可以取消声音持续时间限制?
thanks, have a good day. 谢谢,祝你有美好的一天。
There's no way to only cancel the sound. 没有办法只能取消声音。 Alternatively,control the volume like this:
或者,控制音量如下:
Control the volume: 控制音量:
setVolumeControlStream(AudioManager.STREAM_NOTIFICATION);
For mute the Notification sound: 要使通知声音静音:
final AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.setStreamMute(AudioManager.STREAM_NOTIFICATION, true or false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.