I am trying to make my phone mute when I press the button "Mute" but keep getting the same error. Here is the Code so far:
public void onClick(View v) { AudioManager audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); audioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); }
context in "context.getSystem." is red and cannot resolve. Any help? Thanks!
Aucun commentaire:
Enregistrer un commentaire