File tree 3 files changed +29
-1
lines changed
android/src/main/java/com/instabug/reactlibrary
3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1058,6 +1058,22 @@ public void clearFileAttachment() {
1058
1058
}
1059
1059
}
1060
1060
1061
+ /**
1062
+ * Sets the threshold value of the shake gesture for android devices.
1063
+ * Default for android is an integer value equals 350.
1064
+ * you could increase the shaking difficulty level by
1065
+ * increasing the `350` value and vice versa.
1066
+ *
1067
+ * @param {number} androidThreshold Threshold for android devices.
1068
+ */
1069
+ @ ReactMethod
1070
+ public void setShakingThresholdForAndroid (androidThreshold ) {
1071
+ try {
1072
+ mInstabug .setShakingThreshold (androidThreshold );
1073
+ } catch (Exception e ) {
1074
+ e .printStackTrace ();
1075
+ }
1076
+ }
1061
1077
1062
1078
/**
1063
1079
* Sets a block of code that gets executed when a new message is received.
Original file line number Diff line number Diff line change @@ -246,6 +246,18 @@ module.exports = {
246
246
Instabug . setShakingThresholdForIPhone ( iPhoneShakingThreshold , iPadShakingThreshold ) ;
247
247
} ,
248
248
249
+ /**
250
+ * Sets the threshold value of the shake gesture for android devices.
251
+ * Default for android is an integer value equals 350.
252
+ * you could increase the shaking difficulty level by
253
+ * increasing the `350` value and vice versa
254
+ * @param {number } androidThreshold Threshold for android devices.
255
+ */
256
+ setShakingThresholdForAndroid : function ( androidThreshold ) {
257
+ if ( Platform . OS === 'android' )
258
+ Instabug . setShakingThresholdForAndroid ( androidThreshold ) ;
259
+ } ,
260
+
249
261
/**
250
262
* Sets the default edge and offset from the top at which the floating button
251
263
* will be shown. Different orientations are already handled.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " instabug-reactnative" ,
3
- "version" : " 1.1.1 " ,
3
+ "version" : " 1.1.2 " ,
4
4
"description" : " React Native plugin for integrating the Instabug SDK" ,
5
5
"main" : " index.js" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments