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 を使用