Skip to content

Commit

Permalink
Merge pull request #43 from Instabug/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
DevHossamHassan authored Jun 26, 2017
2 parents e2fcdcc + f4d1958 commit ba85a8b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
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

0 comments on commit ba85a8b

Please sign in to comment.