w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to turn silent mode on during a specific time period in Android? and turn back to normal after the whole duration?

You can use the android FrameWork class AudioManager as follow :

AudioManager manager =
(AudioManager)getSystemService(AUDIO_SERVICE);

manager.setRingerMode(AudioManager.RINGER_MODE_SILENT);

Hope it helps :)





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.