Expose setShakeThresholdForAndroid API to JS

This commit is contained in:
DevHossamHassan
2017-06-26 23:19:46 +02:00
parent 0ed5e1c700
commit c0c09bfc95
2 changed files with 28 additions and 0 deletions
@@ -1058,6 +1058,22 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
}
}
/**
* Sets the threshold value of the shake gesture for android devices.
* Default for android is an integer value equals 350.
* you could increase the shaking difficulty level by
* increasing the `350` value and vice versa.
*
* @param {number} androidThreshold Threshold for android devices.
*/
@ReactMethod
public void setShakingThresholdForAndroid(androidThreshold) {
try {
mInstabug.setShakingThreshold(androidThreshold);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Sets a block of code that gets executed when a new message is received.