Closed rushatgabhane closed 3 years ago
This library will be used in New Expensify. But the library has some useful vibration methods missing. Hence the PR.
Looking forward for your feedback, and a discussion. Thanks!
@mkuczera Requesting your review of the PR :)
Perfect, tried it out, works like a charm :)
Hi! This PR will add 4 new vibration methods for Android. Namely,
effectClick
,effectDoubleClick
,effectHeavyClick
, andeffectTick
.Android reference to the methods can be found here.
I've also refactored
RNHapticFeedbackModule.java
. Now, adding different kinds of vibration in future is as easy as overridingapply()
from theVibrate interface
.VibrateFactory
uses aHashMap
to store all the methods. This gets rid of the long switch case for a cleaner code.Let me know what you think. cc: @mkuczera