shakebug-react-native 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shakebug-react-native",
|
|
3
3
|
"title": "shakebug-react-native",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.3",
|
|
5
5
|
"description": "Shakebug allows users to report the bug from your mobile phone for your application. Here users just need to shake their mobile and all the data regarding bugs & crashes can be seen by developers through their log in panel easily",
|
|
6
6
|
"main": "src/index.tsx",
|
|
7
7
|
"scripts": {
|
package/src/APIs/AddIssue.js
CHANGED
|
@@ -31,7 +31,11 @@ async function AddIssueApi(session_id, application_id, path, isVideo, desc, emai
|
|
|
31
31
|
let osversion = await DeviceInfo.getSystemVersion()
|
|
32
32
|
const type = isVideo ? 'video/mp4' : 'image/jpg';
|
|
33
33
|
const name = isVideo ? 'video.mp4' : 'photo.jpg';
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
let media = path;
|
|
36
|
+
if (Platform.OS === 'android' && !media.startsWith('file://') && !media.startsWith('content://') && !media.startsWith('http')) {
|
|
37
|
+
media = `file://${path}`;
|
|
38
|
+
}
|
|
35
39
|
|
|
36
40
|
|
|
37
41
|
const formData = new FormData();
|
|
@@ -33,7 +33,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
33
33
|
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
const subscription = DeviceEventEmitter.addListener('ScreenshotTaken', async () => {
|
|
36
|
-
if (allowToReportBugByScreenCapture == true) {
|
|
36
|
+
if (allowToReportBugByScreenCapture == true && (!global.isFeatureEnabled || global.isFeatureEnabled('4'))) {
|
|
37
37
|
if (!global.isScreenShotDetected && global.application_id != "" && global.application_id != undefined) {
|
|
38
38
|
OpenShakebug()
|
|
39
39
|
}
|
|
@@ -49,7 +49,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
49
49
|
const subscription = screenShotEmitter.addListener(
|
|
50
50
|
'ScreenshotTaken',
|
|
51
51
|
(event) => {
|
|
52
|
-
if (allowToReportBugByScreenCapture == true) {
|
|
52
|
+
if (allowToReportBugByScreenCapture == true && (!global.isFeatureEnabled || global.isFeatureEnabled('4'))) {
|
|
53
53
|
// setIsScreenShot(true)
|
|
54
54
|
if (!global.isScreenShotDetected && global.application_id != "" && global.application_id != undefined) {
|
|
55
55
|
OpenShakebug()
|
|
@@ -284,7 +284,7 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
284
284
|
let zdata = 0;
|
|
285
285
|
|
|
286
286
|
DeviceInfo.isEmulator().then(res => {
|
|
287
|
-
if (!res && isRecording == false && allowToReportBugByShaking !== false) {
|
|
287
|
+
if (!res && isRecording == false && allowToReportBugByShaking !== false && (!global.isFeatureEnabled || global.isFeatureEnabled('2'))) {
|
|
288
288
|
const subscription = accelerometer.subscribe(async ({ x, y, z, timestamp }) => {
|
|
289
289
|
|
|
290
290
|
let calculate = Math.sqrt(x * x + y * y + z * z);
|