Questions tagged [haptic-feedback]

Haptic Feedback on mobile devices is implemented by installing small motors that generate a vibration when the user interacts with it. Also intensity, length and patterns of the haptic feedback are used to indicate different cases.

115 questions
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
0 answers

Problem with Android 12 and the HapticGenerator API: Audio track randomly start to play at maximum volume. (Even when sound is muted)

Using a Pixel 4 running Android 12 I try to use the new HapticGenerator API (API level >= 31) to generate haptic feedback from an audio track. However, I observe a random problem where the audio track is played during the first milliseconds at…
1
vote
1 answer

Cannot get Haptic Feedback to work with Swift

I'm a CS major in college who had an idea for an Apple Watch app that vibrates every time it reaches a certain time interval, for example the user picks intervals of 20s through a picker, taps "start" and the app starts a timer from 0 to 20 and once…
1
vote
0 answers

How to programmatically enable/disable haptic feedback in System Settings in a device running SDK API level 30+?

Since as of API level 30, System.HAPTIC_FEEDBACK_ENABLED has been marked as deprecated, how would one programmatically enable/disable haptic feedback in System Settings(i.e. globally) on a device running SDK API level 30+ using the…
1
vote
1 answer

Android haptic feedback is not working in Samsung

I'm integrating haptic feedback in my android app which works fine in my Google Pixel 4a phone but its not working at all in Samsung devices. I'm using below snippet for calling it after getting a result from an API…
Anshul Tyagi
  • 2,076
  • 4
  • 34
  • 65
1
vote
0 answers

Create Long length Haptic in iWatch swift

Hi i am aware that apple does not allow us to create core haptic in iWatch instead it make us to use the default haptic it has. But the default haptics are of short length. Can I get help to know how to create long length haptic. Like it should last…
Supreet Patil
  • 21
  • 1
  • 4
1
vote
1 answer

Custom Length Vibrations For Notifications in Swift

I am developing an app that sends vibrations to a users phone based on how long the user trying to reach them holds down a button. However, it has to work when the users app is not open. Is there a way to attach custom haptics to a notification to…
1
vote
1 answer

AudioServicesPlaySystemSound and System Haptics interaction

In an iOS app, I have an interaction where I want to play both a tap sound: AudioServicesPlaySystemSound(1104) and a light haptic: self.feedbackGenerator = [[UISelectionFeedbackGenerator alloc] init]; [self.feedbackGenerator prepare]; //then…
Mitch Cohen
  • 1,551
  • 3
  • 15
  • 29
1
vote
1 answer

How to recreate Haptic Feedback Vibration when you long press on app icon

How can I recreate the exact vibration that happens when you hold down on an app icon like this in swift? The same vibration can be felt when you swipe on a message on Facebook messenger to reply to it.
Sdanson
  • 125
  • 2
  • 5
1
vote
1 answer

How to make device vibrate more intense?

Now I have an extension to make the device vibrate from anywhere in the app: extension UIDevice { static func vibrate(style: UINotificationFeedbackGenerator.FeedbackType) { guard CHHapticEngine.capabilitiesForHardware().supportsHaptics…
Jkrist
  • 748
  • 1
  • 6
  • 24
1
vote
1 answer

Why doesn't Core Haptics play? (CHHapticPatternPlayer)

I am experiencing no haptic output while testing the code below on my physical device (iPhone XR). I followed Apple Developer's "Playing a Single-tap Haptic Pattern" article, as well as double-checked with various other articles on the internet, and…
Eric
  • 330
  • 3
  • 13
1
vote
1 answer

Which is equivalent in Android for iOS selectionChanged() haptic?

I was looking for selectionChanged() for android. I found some constants on android but nothing for 'selectionChanged' : https://developer.android.com/reference/android/os/VibrationEffect Here is apple…
Gilberto Ibarra
  • 2,849
  • 2
  • 27
  • 38
1
vote
1 answer

Deinit UIImpactFeedbackGenerator

I init a UIImpactFeedbackGenerator with a timer with TimeInterval=1.0. After some seconds, I call the deinitHapticFeedback(), as described below and navigate to the next view controller, but the feedback doesn't stop and keeps occurring for about…
Thanasis
  • 301
  • 1
  • 2
  • 6
1
vote
0 answers

CHHapticEngine not running

After a day of playing with the CHHapticEngine and custom haptic patterns, using AHAP files in particular (including adding sound samples), I have lost the sound and haptics in the deivce / iPhone. After a factory reset of the iPhone, there are…
Greg
  • 442
  • 4
  • 16
1
vote
1 answer

Watchkit: How do you call for a vibrate without sound?

In WatchKit, I call: WKInterfaceDevice.current().play(.start) ... and the watch vibrates - but also has a sound. What do I call to vibrate the watch without a sound? Thanks.
Geo
  • 21
  • 3