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 {
2222dependencies {
2323 compile ' com.facebook.react:react-native:0.20.+'
2424 compile (' com.instabug.library:instabug:4.13.0' ){
25- exclude group : ' com.android.support'
25+ exclude group : ' com.android.support:appcompat-v7 '
2626 }
2727
2828}
Original file line number Diff line number Diff line change @@ -1359,6 +1359,24 @@ public void setEnableInAppNotificationSound(boolean shouldPlaySound) {
13591359 }
13601360 }
13611361
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+
13621380 private InstabugCustomTextPlaceHolder .Key getStringToKeyConstant (String key ) {
13631381 switch (key ) {
13641382 case SHAKE_HINT :
Original file line number Diff line number Diff line change @@ -146,6 +146,16 @@ module.exports = {
146146 Instabug . hasRespondedToSurveyWithToken ( surveyToken , surveyTokenCallback ) ;
147147 } ,
148148
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+
149159 /**
150160 * Sets a block of code to be executed just before the SDK's UI is presented.
151161 * 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 {
377377 [Instabug setThresholdForReshowingSurveyAfterDismiss: sessionCount daysCount: daysCount];
378378}
379379
380+ RCT_EXPORT_METHOD (setSessionProfilerEnabled:(BOOL )sessionProfilerEnabled) {
381+ [Instabug setSessionProfilerEnabled: sessionProfilerEnabled];
382+ }
383+
380384RCT_EXPORT_METHOD (isRunningLive:(RCTResponseSenderBlock)callback) {
381385 BOOL result = NO ;
382386#if TARGET_OS_SIMULATOR
You can’t perform that action at this time.
0 commit comments