@@ -19,7 +19,8 @@ public class RNInstabug {
1919
2020 private static RNInstabug instance ;
2121
22- private RNInstabug () {}
22+ private RNInstabug () {
23+ }
2324
2425
2526 public static RNInstabug getInstance () {
@@ -36,14 +37,13 @@ public static RNInstabug getInstance() {
3637 /**
3738 * Initializes the SDK on the native side, which is useful for capturing startup issues specific to the native part of the app.
3839 *
39- * @param application The application context.
40+ * @param application The application context.
4041 * @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}.
4747 * @example <p>Here's an example usage: </p>
4848 * <blockquote><pre>
4949 * RNInstabug.getInstance().init(
@@ -59,17 +59,24 @@ public void init(
5959 @ NonNull Application application ,
6060 @ NonNull String applicationToken ,
6161 int logLevel ,
62+ Boolean ignoreSecureFlag ,
6263 @ NonNull InstabugInvocationEvent ... InvocationEvent
63- ) {
64+ ) {
6465 try {
6566
6667 setBaseUrlForDeprecationLogs ();
6768 setCurrentPlatform ();
6869
69- new Instabug .Builder (application , applicationToken )
70+ Instabug . Builder builder = new Instabug .Builder (application , applicationToken )
7071 .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+
7380
7481 // Temporarily disabling APM hot launches
7582 APM .setHotAppLaunchEnabled (false );
@@ -80,15 +87,13 @@ public void init(
8087 }
8188
8289
83-
8490 /**
8591 * Initializes the SDK on the native side, which is useful for capturing startup issues specific to the native part of the app.
8692 *
87- * @param application The application context.
93+ * @param application The application context.
8894 * @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}.
9297 * @example <p>Here's an example usage: </p>
9398 * <blockquote><pre>
9499 * RNInstabug.getInstance().init(
@@ -104,7 +109,7 @@ public void init(
104109 @ NonNull String applicationToken ,
105110 @ NonNull InstabugInvocationEvent ... invocationEvent
106111 ) {
107- init (application , applicationToken , LogLevel .ERROR , invocationEvent );
112+ init (application , applicationToken , LogLevel .ERROR ,null , invocationEvent );
108113 }
109114
110115 @ VisibleForTesting
@@ -160,6 +165,7 @@ public static class Builder {
160165 * The events that trigger the SDK's user interface.
161166 */
162167 private InstabugInvocationEvent [] invocationEvents ;
168+ private Boolean ignoreFlagSecure ;
163169
164170
165171 /**
@@ -210,6 +216,16 @@ public Builder setCodePushVersion(String codePushVersion) {
210216 return this ;
211217 }
212218
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+
213229 /**
214230 * Sets the invocation triggering events for the SDK's user interface
215231 *
@@ -237,6 +253,10 @@ public void build() {
237253 instabugBuilder .setCodePushVersion (codePushVersion );
238254 }
239255
256+ if (ignoreFlagSecure != null ) {
257+ instabugBuilder .ignoreFlagSecure (ignoreFlagSecure );
258+ }
259+
240260 instabugBuilder .build ();
241261
242262 // Temporarily disabling APM hot launches
0 commit comments