My goal is to support 2 operations:
mute phone (possibly with vibrations enabled/disabled), so when a call or sms is received it won't make noise
unmute phone and restore the volume to the state before muting phone
How can I do this? What permissions are required in AndroidManifest?
If what you want is to disable sound and restore the sound setting to previous state, this worked for me.
This should do.
This is the permission for vibrate into the manifest file
this is for to put the device in silent mode with vibrate
this is for to put into the ringing mode