Is it possible to trigger a haptic feedback without the accompanying sound on apple Watch OS 2
Asked Answered
D

1

10

Assuming the user has not muted their watch sounds. Is it possible for an apple watch app to trigger a haptic feedback (i.e vibrate) without the accompanying sound.

This is different than receiving a notification which is handled automatically by the watch. In this case I'm invoking the haptic feedback using a watch app.

like this: [[WKInterfaceDevice currentDevice] playHaptic:WKHapticTypeClick];

Dominic answered 19/1, 2016 at 19:17 Comment(2)
Possible duplicate of Can a local notification only vibrate the apple watch and not play a sound?Clementclementas
That's my question as well. Neither has an answer. They are different questions. In this one I'm trying to see if I invoke it specifically if there is a way to suppress the sound. The other relates to how the watch handles notifications in general and if there is a way for the notifier to suppress the sound.Dominic
S
4

There is a hacky way to do so. You can start to play WKAudioFilePlayer right before haptic and there will be no sound:

player.play()
WKInterfaceDevice.current().play(.click)

I suggest you to create a short silent (very low amplitude and high pitch) audio file for this purpose. And remember that this solution can be buggy.

Sprayberry answered 22/7, 2017 at 11:29 Comment(1)
Hi @kelin, any update doing this with AVPlayer as WKAudioFilePlayer was depracated? When I play AVPlayer right before haptic feedback, it is being ignored at all. Thanks a lot for any hint how to make it work thanks!Pensionary

© 2022 - 2024 — McMap. All rights reserved.