Vibrate Phone | Android Studio | Java
How to vibrate phone programmatically for a specific time? You can easily implement the phone vibrate programmatically using Android Vibrator API . In this example, we will vibrate the phone for 1000 microseconds i.e. 1 second by clicking a button you can change the duration according to your requirements. >>Watch For Kotlin Step 1: Create a new project OR Open your existing project Step 2: Code Open AndroidManifest and add VIBRATE permission. AndroidManifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "com.blogspot.atifsoftwares.vibratephone" > <!--VIBRATE permission--> <uses-permission android:name= "android.permission.VIBRATE" /> <application android:allowBackup= "true" android:icon= "@mipmap/ic_launcher" android:label=