@@ -19,7 +19,8 @@ public class RNInstabug {
19
19
20
20
private static RNInstabug instance ;
21
21
22
- private RNInstabug () {}
22
+ private RNInstabug () {
23
+ }
23
24
24
25
25
26
public static RNInstabug getInstance () {
@@ -36,14 +37,13 @@ public static RNInstabug getInstance() {
36
37
/**
37
38
* Initializes the SDK on the native side, which is useful for capturing startup issues specific to the native part of the app.
38
39
*
39
- * @param application The application context.
40
+ * @param application The application context.
40
41
* @param applicationToken The app's identifying token, available on your dashboard.
41
- * @param logLevel The level of detail in logs that you want to print.
42
- * <p>Pick one of the log levels described in {@link LogLevel}.
43
- * default logLevel is {@link LogLevel#ERROR}</p>
44
- * @param InvocationEvent The events that trigger the SDK's user interface.
45
- * Choose from the available events listed in {@link InstabugInvocationEvent}.
46
- *
42
+ * @param logLevel The level of detail in logs that you want to print.
43
+ * <p>Pick one of the log levels described in {@link LogLevel}.
44
+ * default logLevel is {@link LogLevel#ERROR}</p>
45
+ * @param InvocationEvent The events that trigger the SDK's user interface.
46
+ * Choose from the available events listed in {@link InstabugInvocationEvent}.
47
47
* @example <p>Here's an example usage: </p>
48
48
* <blockquote><pre>
49
49
* RNInstabug.getInstance().init(
@@ -59,17 +59,24 @@ public void init(
59
59
@ NonNull Application application ,
60
60
@ NonNull String applicationToken ,
61
61
int logLevel ,
62
+ Boolean ignoreSecureFlag ,
62
63
@ NonNull InstabugInvocationEvent ... InvocationEvent
63
- ) {
64
+ ) {
64
65
try {
65
66
66
67
setBaseUrlForDeprecationLogs ();
67
68
setCurrentPlatform ();
68
69
69
- new Instabug .Builder (application , applicationToken )
70
+ Instabug . Builder builder = new Instabug .Builder (application , applicationToken )
70
71
.setInvocationEvents (InvocationEvent )
71
- .setSdkDebugLogsLevel (logLevel )
72
- .build ();
72
+ .setSdkDebugLogsLevel (logLevel );
73
+
74
+ if (ignoreSecureFlag != null ) {
75
+ builder .ignoreFlagSecure (ignoreSecureFlag );
76
+ }
77
+
78
+ builder .build ();
79
+
73
80
74
81
// Temporarily disabling APM hot launches
75
82
APM .setHotAppLaunchEnabled (false );
@@ -80,15 +87,13 @@ public void init(
80
87
}
81
88
82
89
83
-
84
90
/**
85
91
* Initializes the SDK on the native side, which is useful for capturing startup issues specific to the native part of the app.
86
92
*
87
- * @param application The application context.
93
+ * @param application The application context.
88
94
* @param applicationToken The app's identifying token, available on your dashboard.
89
- * @param invocationEvent The events that trigger the SDK's user interface.
90
- * Choose from the available events listed in {@link InstabugInvocationEvent}.
91
- *
95
+ * @param invocationEvent The events that trigger the SDK's user interface.
96
+ * Choose from the available events listed in {@link InstabugInvocationEvent}.
92
97
* @example <p>Here's an example usage: </p>
93
98
* <blockquote><pre>
94
99
* RNInstabug.getInstance().init(
@@ -104,7 +109,7 @@ public void init(
104
109
@ NonNull String applicationToken ,
105
110
@ NonNull InstabugInvocationEvent ... invocationEvent
106
111
) {
107
- init (application , applicationToken , LogLevel .ERROR , invocationEvent );
112
+ init (application , applicationToken , LogLevel .ERROR ,null , invocationEvent );
108
113
}
109
114
110
115
@ VisibleForTesting
@@ -160,6 +165,7 @@ public static class Builder {
160
165
* The events that trigger the SDK's user interface.
161
166
*/
162
167
private InstabugInvocationEvent [] invocationEvents ;
168
+ private Boolean ignoreFlagSecure ;
163
169
164
170
165
171
/**
@@ -210,6 +216,16 @@ public Builder setCodePushVersion(String codePushVersion) {
210
216
return this ;
211
217
}
212
218
219
+ /**
220
+ * Sets flag to override SDK screenshot security behavior.
221
+ *
222
+ * @param ignoreFlagSecure flag to override SDK screenshot security behavior.
223
+ */
224
+ public Builder ignoreFlagSecure (boolean ignoreFlagSecure ) {
225
+ this .ignoreFlagSecure = ignoreFlagSecure ;
226
+ return this ;
227
+ }
228
+
213
229
/**
214
230
* Sets the invocation triggering events for the SDK's user interface
215
231
*
@@ -237,6 +253,10 @@ public void build() {
237
253
instabugBuilder .setCodePushVersion (codePushVersion );
238
254
}
239
255
256
+ if (ignoreFlagSecure != null ) {
257
+ instabugBuilder .ignoreFlagSecure (ignoreFlagSecure );
258
+ }
259
+
240
260
instabugBuilder .build ();
241
261
242
262
// Temporarily disabling APM hot launches
0 commit comments