How to change vibrate mode to ringer prgrammatically through audio manager

后端 未结 4 1015
一生所求
一生所求 2021-01-05 06:27

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

4条回答
  •  长发绾君心
    2021-01-05 07:31

    try this:

    AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
    audioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
    

提交回复
热议问题