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.
私のアプリでは、ミュート ボタンがあり、onClick イベントにいくつかのコードがあります。
AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); am.setStreamMute(AudioManager.STREAM_MUSIC, true);
アプリをミュートするだけだと思いますが、システムをミュートします。どうすれば修正できますか?皆さんありがとう。
これを試してみてください
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 0, 0);