How To Enable Full Silent Mode Without Vibrate in Android Programmatically- AIDE


 Hii guys welcome back you my new post in this post i will show you How to silent android mobile without touch and How enable full silent mode without vibrate android mobile programmatically so let's start.

step.1

firts of all, you will need the source code of an application, To add silent mode function in android mobile, iam using the Test android code For the example, you will find it on Our Github Page. and copy this Url.


Step.2

after copying the url of test android code, you have to open the AIDE application, after this you have to click on the Clone Git repository and paste the Url.

   Also Read: How to uninstall Android App Programmatically


Step.3
now you have to firts import AudioManager and Context function in the MainActivity.Java File of this application, so for this you copy and paste it.

import android.media.AudioManager;  
import android.content.Context;  
 
Step.4


Now you have to paste the code of silent mode below the launch activity of this application. then you have to build this application.




AudioManager audio_mngr = (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE);  
 audio_mngr .setRingerMode(AudioManager.RINGER_MODE_SILENT);  
 
Step.5
Now as soon as you open this application that your android mobile will go on silent mode and it will not even vibrate your mobile when you have calls and sms.



Ok so today's post i will show you how to silent android mobile programmatically and how to silent mode without vibrate android programmatically so i hope you like this post and i will see you in the next post Thanks and Take Care.

Post a Comment

0 Comments