mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
861 stars 106 forks source link

Why does Android use the Vibrations API instead of View.performHapticFeedback + HapticFeedbackConstants #41

Closed thibmaek closed 4 years ago

thibmaek commented 4 years ago

When digging into the code for Android I saw you are using the Android Vibration API. The haptic feedback on Android right now is very aggressive and a lot more 'in your face' than the nice subtle haptics on iOS delivered by UIImpactFeedbackGenerator.

There are APIs available for Android that use Haptics which allow for much more subtle feedback patterns:

Is there a specific reason for this choice? Otherwise, it might be interesting to implement this (I'd be happy to help via PR)

mkuczera commented 4 years ago

Hi, sorry for the late response. As far as i read about the real haptic feedback of android the feedback must be bound to a View. I tried back then a little bit around the API but couldn´t get a proper handling due to my lack of Java Skills.

I would be glad to get help regarding this feature as mentioned in the Readme:

Contribution Section

bitcrumb commented 4 years ago

@eliaslecomte ;-)