File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed
src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ android {
22
22
dependencies {
23
23
compile ' com.facebook.react:react-native:0.20.+'
24
24
compile (' com.instabug.library:instabug:4.13.0' ){
25
- exclude group : ' com.android.support'
25
+ exclude group : ' com.android.support:appcompat-v7 '
26
26
}
27
27
28
28
}
Original file line number Diff line number Diff line change @@ -1359,6 +1359,24 @@ public void setEnableInAppNotificationSound(boolean shouldPlaySound) {
1359
1359
}
1360
1360
}
1361
1361
1362
+ /**
1363
+ * Enable/disable session profiler
1364
+ *
1365
+ * @param sessionProfilerEnabled desired state of the session profiler feature
1366
+ */
1367
+ @ ReactMethod
1368
+ public void setSessionProfilerEnabled (boolean sessionProfilerEnabled ) {
1369
+ try {
1370
+ if (sessionProfilerEnabled ) {
1371
+ Instabug .setSessionProfilerState (Feature .State .ENABLED );
1372
+ } else {
1373
+ Instabug .setSessionProfilerState (Feature .State .DISABLED );
1374
+ }
1375
+ } catch (Exception e ) {
1376
+ e .printStackTrace ();
1377
+ }
1378
+ }
1379
+
1362
1380
private InstabugCustomTextPlaceHolder .Key getStringToKeyConstant (String key ) {
1363
1381
switch (key ) {
1364
1382
case SHAKE_HINT :
Original file line number Diff line number Diff line change @@ -146,6 +146,16 @@ module.exports = {
146
146
Instabug . hasRespondedToSurveyWithToken ( surveyToken , surveyTokenCallback ) ;
147
147
} ,
148
148
149
+ /**
150
+ * The session profiler is enabled by default and it attaches to the bug and
151
+ * crash reports the following information during the last 60 seconds before the report is sent.
152
+ * @param {boolean } sessionProfilerEnabled - A boolean parameter to enable or disable the feature.
153
+ *
154
+ */
155
+ setSessionProfilerEnabled : function ( sessionProfilerEnabled ) {
156
+ Instabug . setSessionProfilerEnabled ( sessionProfilerEnabled ) ;
157
+ } ,
158
+
149
159
/**
150
160
* Sets a block of code to be executed just before the SDK's UI is presented.
151
161
* This block is executed on the UI thread. Could be used for performing any
Original file line number Diff line number Diff line change @@ -377,6 +377,10 @@ - (dispatch_queue_t)methodQueue {
377
377
[Instabug setThresholdForReshowingSurveyAfterDismiss: sessionCount daysCount: daysCount];
378
378
}
379
379
380
+ RCT_EXPORT_METHOD (setSessionProfilerEnabled:(BOOL )sessionProfilerEnabled) {
381
+ [Instabug setSessionProfilerEnabled: sessionProfilerEnabled];
382
+ }
383
+
380
384
RCT_EXPORT_METHOD (isRunningLive:(RCTResponseSenderBlock)callback) {
381
385
BOOL result = NO ;
382
386
#if TARGET_OS_SIMULATOR
You can’t perform that action at this time.
0 commit comments