File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
android/src/main/java/com/instabug/instabugflutter
main/kotlin/com/example/InstabugSample
test/java/com/example/InstabugSample Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -422,6 +422,15 @@ public void setSessionProfilerEnabled(boolean sessionProfilerEnabled) {
422
422
}
423
423
}
424
424
425
+ /**
426
+ * Enable/disable SDK logs
427
+ *
428
+ * @param debugEnabled desired state of debug mode
429
+ */
430
+ public void setDebugEnabled (boolean debugEnabled ) {
431
+ Instabug .setDebugEnabled (debugEnabled );
432
+ }
433
+
425
434
/**
426
435
* Set the primary color that the SDK will use to tint certain UI elements in
427
436
* the SDK
Original file line number Diff line number Diff line change @@ -99,6 +99,15 @@ public void testSetSessionProfilerEnabled() {
99
99
verify (instabugMock ).setSessionProfilerEnabled (true );
100
100
}
101
101
102
+ public void testSetDebugEnabled () {
103
+ String methodName = "setDebugEnabled" ;
104
+ ArrayList <Object > argsList = new ArrayList <>();
105
+ argsList .add (true );
106
+ Mockito .doNothing ().when (instabugMock ).setDebugEnabled (any (Boolean .class ));
107
+ testMethodCall (methodName ,argsList );
108
+ verify (instabugMock ).setDebugEnabled (true );
109
+ }
110
+
102
111
public void testSetPrimaryColor () {
103
112
String methodName = "setPrimaryColor" ;
104
113
ArrayList <Object > argsList = new ArrayList <>();
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ public void testSetSessionProfilerEnabled() {
57
57
new OnMethodCallTests ().testSetSessionProfilerEnabled ();
58
58
}
59
59
60
+ /**
61
+ * (boolean)
62
+ */
63
+ @ Test
64
+ public void testSetDebugEnabled () {
65
+ new OnMethodCallTests ().testSetDebugEnabled ();
66
+ }
67
+
60
68
/**
61
69
* (long)
62
70
*/
Original file line number Diff line number Diff line change @@ -225,6 +225,16 @@ class Instabug {
225
225
await _channel.invokeMethod <Object >('setSessionProfilerEnabled:' , params);
226
226
}
227
227
228
+ /// Android only
229
+ /// Enable/disable SDK logs
230
+ /// [debugEnabled] desired state of debug mode.
231
+ static void setDebugEnabled (bool debugEnabled) async {
232
+ if (Platform .isAndroid) {
233
+ final List <dynamic > params = < dynamic > [debugEnabled];
234
+ await _channel.invokeMethod <Object >('setDebugEnabled:' , params);
235
+ }
236
+ }
237
+
228
238
/// Sets the primary color of the SDK's UI.
229
239
/// Sets the color of UI elements indicating interactivity or call to action.
230
240
/// [color] primaryColor A color to set the UI elements of the SDK to.
You can’t perform that action at this time.
0 commit comments