Haptic feedback not working?


#1

Hey folks,

I’ve been trying to get Haptic feedback working from within the Ionic 2 app. I haven’t done anything crazy in my app, but Haptic feedback has never worked.

Is there something I need to turn on, or a plugin I need to install to make this work? According to the Ionic source code, and the documentation, Haptic feedback should be used by default via component internals: http://ionicframework.com/docs/v2/api/tap-click/Haptic/

This is not working on Android, nor on iOS.

Any help would be appreciated. Thanks!


#2

You need to have this plugin installed: https://github.com/EddyVerbruggen/cordova-plugin-taptic-engine and it only works on iOS


#3

Hmmm. Thanks. That helps clear things up a bit. Do you have any idea why this isn’t something working on Android? Any idea if this is on the roadmap? It would really help apps to feel more native if haptic worked across platforms!


#4

The plugin only supports iOS. Not sure if Ionic is planning to add Android support.

I think this plugin works for android: https://github.com/VVelda/device-feedback

Maybe you can create a provider that you inject in your components and trigger the functionality from there. The provider can figure out if it’s iOS or Android and act accordingly.