Questions tagged [vibration]

Vibration is a kind of user interaction or attention feedback provided by some devices.

Vibration is a kind of user interaction or attention feedback provided by some devices.

Starting point.

402 questions
540
votes
13 answers

How to make an Android device vibrate? with different frequency?

I wrote an Android application. Now, I want to make the device vibrate when a certain action occurs. How can I do this?
Billie
  • 8,100
  • 12
  • 31
  • 62
230
votes
12 answers

Making the iPhone vibrate

How can the iPhone be set to vibrate once? For example, when a player loses a life or the game is over, the iPhone should vibrate.
some_id
  • 28,294
  • 58
  • 173
  • 293
128
votes
11 answers

How to make iPhone vibrate using Swift?

I need to make the iPhone vibrate, but I don't know how to do that in Swift. I know that in Objective-C, you just write: import AudioToolbox AudioServicesPlayAlertSound(kSystemSoundID_Vibrate); But that is not working for me.
Nico Gutraich
  • 1,465
  • 3
  • 10
  • 9
72
votes
2 answers

Are there APIs for custom vibrations in iOS?

Starting in iOS 5, users are able to create custom vibration patterns for alerts and rings. The following screenshot shows the UI for creating one (Contacts app in iOS 6): I've been searching around, including the documentation, and I cannot find…
Andrew
  • 2,645
  • 1
  • 19
  • 28
45
votes
5 answers

How to enable haptic feedback on button view

I want to add haptic feedback to my application's buttons and control them programmatically to show button state (enabled and disabled). The default haptic feedback setter works only for long press. How can i make it work for simple button…
Kshitij Aggarwal
  • 4,960
  • 5
  • 32
  • 41
33
votes
7 answers

Disable vibration for a notification

I'm writing an app using notification. Google developer guidelines encourages developers to provide settings to customize the notifications (disable vibration, set notification sound...), so I am trying to disable vibration for notifications if the…
nstCactus
  • 4,646
  • 2
  • 28
  • 41
26
votes
6 answers

How can I make vibrate animation for ImageView

I have no idea for this animation. How can I do it via XML like that? Or another solution?
Nam Vu
  • 5,563
  • 5
  • 52
  • 87
23
votes
3 answers

Vibrate onclick

Is there a way to get a button to vibrate but only when the if condition is verified? Here's the code: Vibrator vibe = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE) ; if(l2>=l1){ insertactone.setBackgroundColor(Color.RED); …
Rui Miranda
  • 289
  • 1
  • 3
  • 9
22
votes
1 answer

How to provide customized vibration on specific incoming calls

The program functions like this: the user has a list of phone numbers, for which the cellphone could vibrate upon an incoming call only when no other system-wide application would provide vibration (such as in mute mode). I know that this is…
peter
  • 984
  • 1
  • 8
  • 23
17
votes
5 answers

Vibrate when hold down button

I am making an app where the user holds down a button to make the phone vibrate and i'm not sure how to make it so only when the button is being held down it vibrates, my code so far is. package one.two.bn; import android.app.Activity; import…
Lucas
  • 191
  • 1
  • 1
  • 4
14
votes
4 answers

How do you make the iPhone vibrate for arbitrary durations?

In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); In jailbroken phones, you used to be able to use the MeCCA.framework to do…
KevinButler
  • 1,023
  • 1
  • 10
  • 14
14
votes
1 answer

Make the wearable vibrate from within an android wear app

I'm writing a simple wearable app to my LG watch that sends vibrations to the watch on constant intervals and show some mock data. Although I've looked for an answer, I could't find a way to make the watch vibrate. Any help would be appriciated.
Jacob
  • 717
  • 5
  • 14
13
votes
1 answer

iPhone - How do I know if the vibrate is on or off for iOS?

Do you know how I may know if the iPhone is on vibrate mode ? I don't find anything about this on the Web... Too tired to see ? I want to display an icon in the app so that the user can know looking at it if the phone is on vibrate mode or not. Tha…
Oliver
  • 21,876
  • 32
  • 134
  • 229
13
votes
4 answers

How to vibrate Android device on button click using vibrator effects using Kotlin?

How to vibrate an Android device coding with Kotlin when pressing any buttons? I have used this code below, but there aren't any effects or vibrations performed. //click listener imgNextBtn.setOnClickListener { val vibe:Vibrator =…
Davinder Goel
  • 643
  • 2
  • 6
  • 18
12
votes
2 answers

Android: Does Notification.DEFAULT_VIBRATE require vibrate permission?

Sometimes I read that notification.defaults|= Notification.DEFAULT_VIBRATE; and notification.defaults = Notification.DEFAULT_ALL; requires the vibrate permission But…
Xander
  • 5,007
  • 14
  • 46
  • 76
1
2 3
26 27