How to change vibrate mode to ringer prgrammatically through audio manager
android
Solution
set SILENT mode to Normal mode using `AudioManager`
AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
switch (am.getRingerMode()) {
case AudioManager.RINGER_MODE_SILENT:
Log.i("MyApp","Silent mode");
am.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
break;
}
Problem
I am making application where phone mode will changes from silent mode to ringer mode if the user sends an sms with some specific keyword. The application mainly works when user lost his cell somewhere in house and its on silent mode. My main question is how can i change the phone mode through audio manager ??