The Android framework includes support for Vibration available on devices, allowing you to control the device's vibrations from your application. Questions regarding practical and advanced use of Vibrations must fall under this tag.
Questions tagged [android-vibration]
202 questions
2
votes
1 answer
Set customized vibration with incoming call in android
How can we set different vibration pattens for different contacts with incoming call ?
During my research and development I have refereed this :
1) How to provide customized vibration on specific incoming calls
2) How to change incoming call…

Jetly Brevo
- 109
- 3
2
votes
1 answer
how to change ringer mode in background(Vibrate or Silent)
I'm trying to write a program in which user can set time that will change ringer mode to vibrate or normal in background. When I set the start time it's working but at the end time it's not changing and device continuing vibrate mode.
I just want,…

D_Alpha
- 4,039
- 22
- 36
2
votes
0 answers
Make Phonegap Vibrate Plugin respect Audio Mute Setting [Android]
I searched for a solution to make my Android Phonegap application respect the mute audio setting, when using the Vibration plugin (org.apache.cordova.vibration 0.3.11)
https://github.com/apache/cordova-plugin-vibration
But there seems to be no way…

user3595386
- 192
- 1
- 6
2
votes
2 answers
Android: phone ignores correct vibration code
Setting.
I would like to make my phone vibrate when a button is clicked. I use the code of SO question: How to make an Android device vibrate?.
The code to let the phone vibrate:
@Override
public void onClick (View view)
{
Vibrator vibrator =…

LaDude
- 1,383
- 1
- 11
- 27
2
votes
2 answers
How to change incoming call Vibration level when incoming call made?
Somehow tricky question. I am working with one app through which user can set incoming call custom ringtone and different vibration level for different contacts.
I have stuck with vibration level setting. We can set vibration level using,
Vibrator v…

Hardik Joshi
- 9,477
- 12
- 61
- 113
2
votes
0 answers
How can I change the default vibration pattern?
I want to replace the default vibration pattern of the system to my customized vibration pattern, how can i do it?

user3849690
- 105
- 1
- 9
2
votes
1 answer
Will Vibrator.vibrate throw an error if the device can't vibrate?
I'm hoping not, but just wanted to get a definitive answer since its not stated in the docs. Do I have to check with Vibrate.hasVibrator before vibrating?

Mohamed Hafez
- 8,621
- 7
- 41
- 49
2
votes
3 answers
How to Vibrate Android device for long time(e.g 2,5,10 minutes)
I have passed a pattern for vibration and -1 for no repeat.But I want to pass 10 in place of -1(now it should repeat 10 times) then this patterns is not repeating 10 times.how to do this?currently I am using this code
Vibrator mVibrate =…

Atul Bhardwaj
- 6,647
- 5
- 45
- 63
2
votes
1 answer
Android Vibrate Service (Vibrator) is not working for long time
I want to Vibrate a phone for long time(e.g 2 minutes) but It vibrates for very less time.
i am using this code
Vibrator mVibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
mVibrate.vibrate(2*60*1000); // 2 Minutes
How to vibrate for…

Atul Bhardwaj
- 6,647
- 5
- 45
- 63
2
votes
1 answer
Can't start repeating vibration after SCREEN_ON intent
I have an Service with endless vibrations, but vibrations stop when screen is turned off. After adding correct BroadcastReceiver, I noticed that I am unable to play repeating vibrations at all, after either screen on or off. Example simple code…

Koger
- 1,783
- 2
- 23
- 34
2
votes
2 answers
How to use the Broadcast Receiver in android to vibrate the device ?
public class MyBroadcastReceiver extends BroadcastReceiver{
public void onReceive(Context context , Intent intent){
Toast.makeText(context, "Your time is up", Toast.LENGTH_LONG).show();
Vibrator vibrator;
// ERROR here…

Chetna
- 165
- 1
- 6
- 15
1
vote
0 answers
On Android how to detect vibrator quality or vibrator type?
On Android, I can use View.performHapticFeedback(HapticFeedbackConstants.XXX) to perform the vibration. But for older phones or phones with Eccentric Rotating Mass (ERM) haptic actuators (vibrators), the experience isn't great. So I want to detect…

John 6
- 99
- 1
- 5
1
vote
2 answers
Vibration is gone when running Android app in background
I have created an app that gives the user vibration alerts when tilting the phone in a certain direction. It works fine when running the app, however, when closing the window to run the app in background, the vibration stops working. How can I…

Frederik Petri
- 451
- 8
- 24
1
vote
0 answers
Vibrator Service Doesn't Run When App is Minimized in Android
I have the Vibrator Service running after a timer completes. It works, except when the app is minimized/exited via the Home button. I know that onStop() is called in this case, and think it may be related to that. Calling MediaPlayer (as a sound…

Brian Salomone
- 11
- 3
1
vote
0 answers
Can't detect vibrator-service (vibratorManager) on Android 13 emulator
I can detect whether vibrator is vibrating or not with adb logcat -b system on Android 12 emulator. However Android 13 emulator doesn't show anything. So I cannot assure the vibrator is working or not on Android 13.
For example:
if…

Tieria
- 333
- 3
- 11