Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想对错误发出哔哔声。
我发现:
ToneGenerator tone = new ToneGenerator(AudioManager.STREAM_MUSIC, 50);
和:
tone.startTone(ToneGenerator.TONE_CDMA_ABBR_ALERT);
我尝试了其他各种流。
但我什么也没听到。
我必须设置权限吗?如果是这样,是哪一个?
谢谢
我做的!
使用 STREAM_ALARM 和 TONE_PROP_BEEP