How to provide haptic feedback?

Monkey Targets Forums/Android/How to provide haptic feedback?

PoliteProgrammer(Posted 2015) [#1]
Hi All,
Would anyone be able to point me in the right direction to implement haptic feedback (that's the little vibration/rumble that your phone does when, for example, you press a button) within my game?

A bit of Googling indicates that I probably need to trigger a call to view.performHapticFeedback(int), but as a novice in interfacing with native code, I'm not entirely sure how to do that. For example, what view would I need to call this method on, and how would I get it?

Any guidance would be appreciated!

Thanks in advance,
PP


StoneFaceEXE(Posted 2015) [#2]
Diddy has a StartVibration(milliseconds) function, will that suffice?


PoliteProgrammer(Posted 2015) [#3]
That does indeed work for my purposes. Thanks very much!