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
4
votes
0 answers
Android 13 vibration is not working when "Vibration and haptics" is off
I target my application to Android 13 (API 33). My application has a vibration mode. When I put my application to vibrate mode it vibrates on actions instead of playing sound. The problem I'm facing is that in Android 13 when the "Vibration and…

Bills
- 768
- 7
- 19
4
votes
2 answers
how to add vibration and ringtone when launch application home page android
i want to add vibration and a play music in my application home page means when my application launch it vibrate and play a ring tone until i not press button for going to another activity means it stops the vibration and sound after when i go to…

SRam
- 2,832
- 4
- 45
- 72
4
votes
3 answers
Simulate API 29 Vibrations in 26 and below
I want to simulate API 29 vibration effects:
EFFECT_CLICK
EFFECT_DOUBLE_CLICK
EFFECT_HEAVY_CLICK
EFFECT_TICK
in version 26 and lower as well. Does anybody know how these translate?

lcj
- 1,355
- 16
- 37
4
votes
2 answers
How to get pre-defined vibration patterns?
I'm trying to make the device vibrate in a pre-defined pattern, which is defined in the VibrationEffect class, with patterns like EFFECT_CLICK, EFFECT_POP, and others. I noticed that they are all annotated by @hide, It seems like there's no public…

Jack
- 5,354
- 2
- 29
- 54
4
votes
2 answers
Why AudioManager.getRingerMode() return only 3 modes?
According to the document,
getRingerMode() returns the current ringtone mode, one of
RINGER_MODE_NORMAL, RINGER_MODE_SILENT, or RINGER_MODE_VIBRATE.
But there should be 4 modes, right?
Sound ON, Vibrate OFF: How can I know that the setting is…

iForests
- 6,757
- 10
- 42
- 75
4
votes
1 answer
How to solve Auto Haptic Vibration on Android that occurs with music?
I have a music application and when I test it I get no vibration but users say that their devices vibrate with the music! I searched the net and found that it is may be related to Auto Haptic feature of the device..
Is there a way to customize this…

frankish
- 6,738
- 9
- 49
- 100
4
votes
1 answer
How to read vibration setting android?
Is it possible to read vibration setting for ringing?
I'm getting vibration state by using:
if(audioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT)
{
//silent
}
else if(audioManager.getRingerMode() ==…
user1982396
3
votes
1 answer
how to do haptic feedback when an ImageView is not working
I created an Activity displays an ImageView on the screen. I want get haptic feedback when the image is clicked.
In the main layout main.xml I added the next ImageView tag:

sirlion
- 287
- 2
- 4
- 11
3
votes
1 answer
How can I check if haptic feedback enabled in system on Android 13 or higher?
I'm trying to get if haptic feedback enabled in System Settings, i.e. globally on a device. I don't need to set this setting, just read.
We do it this way on Android 12 or lower:
Settings.System.getInt(context.contentResolver,…

Dmitry Semenov
- 76
- 4
3
votes
1 answer
Disable vibration on RecyclerView item drag
I am implementing a RecyclerView with drag and drop functionality using ItemTouch.Callback. Right now the device vibrates slightly when I start dragging a ViewHolder.
How can I stop the device vibration when the drag begins?

Ehtesham Hasan
- 4,133
- 2
- 23
- 31
3
votes
2 answers
vibrate_when_ringing on Android Marshmallow (6.0)
In my code I have:
Settings.System.putInt(this.getContentResolver(), "vibrate_when_ringing", isVibrateWhenRinging ? 1 :0);
Using the following permission:
This was working fine…

Ferran Negre
- 3,712
- 3
- 34
- 56
3
votes
2 answers
Android Create vibration pattern like Samsung
I'm trying to create a View with touch events to create a vibration pattern like samsung does.
I use CountDownTimer to start recording during 5 seconds. I want to catch ACTION_DOWN and ACTION_UP events from touch.
Are there a library to create…

jzafrilla
- 1,416
- 3
- 18
- 41
3
votes
1 answer
How to Call Vibrator inside a Service in android
I am trying to run the vibrator if service is called from my app.I am starting the service from Fragment but i don't know why vibrator is not working inside the service.I couldn't even print the Toast.My code:
Calling from Fragment:
Intent buzz= new…

Setu Kumar Basak
- 11,460
- 9
- 53
- 85
3
votes
2 answers
Why VIBRATOR_SERVICE is not working consistently?
I have 2 phones: one is on Android 4.1.1 and the other is on Android 4.1.2.
On Android 4.1.1 phone, the vibration intensity depends on the Haptic Feedback level while 4.1.2 phone vibration is strong and doesn't depend on this Haptic Feedback level…

YRTM2014
- 165
- 1
- 8
3
votes
0 answers
Android vibrator with switch
I am trying to have several buttons to give several different vibrator buzz types upon press. I am able to feed in the variable" day with. The vibrator only vibrates three times very shortly and then plays the toast and then stops. It doesn't get to…

Jayizzle
- 532
- 1
- 6
- 24