File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1058,6 +1058,22 @@ public void clearFileAttachment() {
10581058 }
10591059 }
10601060
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+ }
10611077
10621078 /**
10631079 * 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 = {
246246 Instabug . setShakingThresholdForIPhone ( iPhoneShakingThreshold , iPadShakingThreshold ) ;
247247 } ,
248248
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+
249261 /**
250262 * Sets the default edge and offset from the top at which the floating button
251263 * will be shown. Different orientations are already handled.
You can’t perform that action at this time.
0 commit comments