About AutoMode
In order to use AndroidManager class, you have to first create an object of AudioManager class by calling the getSystemService() method. Once you instantiate the object of AudioManager class, you can use setRingerMode method to set the audio or ringer profile of your device.
by L####:
Very very nice work keep it up...