Skip to content
Merged

Dev #43

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,22 @@ public void clearFileAttachment() {
}
}

/**
* 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.
Expand Down
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ module.exports = {
Instabug.setShakingThresholdForIPhone(iPhoneShakingThreshold, iPadShakingThreshold);
},

/**
* 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.
*/
setShakingThresholdForAndroid: function (androidThreshold) {
if (Platform.OS === 'android')
Instabug.setShakingThresholdForAndroid(androidThreshold);
},

/**
* Sets the default edge and offset from the top at which the floating button
* will be shown. Different orientations are already handled.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instabug-reactnative",
"version": "1.1.1",
"version": "1.1.2",
"description": "React Native plugin for integrating the Instabug SDK",
"main": "index.js",
"repository": {
Expand Down