File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 8
8
import com .facebook .react .bridge .ReactMethod ;
9
9
import com .facebook .react .bridge .ReadableArray ;
10
10
import com .facebook .react .bridge .ReadableMap ;
11
+
11
12
import com .instabug .library .Instabug ;
12
13
import com .instabug .library .internal .module .InstabugLocale ;
13
14
import com .instabug .library .invocation .InstabugInvocationEvent ;
14
15
import com .instabug .library .invocation .InstabugInvocationMode ;
15
16
import com .instabug .library .logging .InstabugLog ;
17
+ import com .instabug .library .bugreporting .model .ReportCategory ;
16
18
17
19
import java .util .ArrayList ;
18
20
import java .util .HashMap ;
@@ -617,6 +619,20 @@ public void clearAllUserAttributes() {
617
619
}
618
620
}
619
621
622
+ public void setReportCategories (String ... categoriesTitles ) {
623
+ try {
624
+ ArrayList <ReportCategory > bugCategories = new ArrayList <>();
625
+
626
+ for (String category : categoriesTitles ) {
627
+ bugCategories .add (ReportCategory .getInstance ().withLabel (category );
628
+ }
629
+
630
+ Instabug .setReportCategories (bugCategories );
631
+ } catch (Exception e ) {
632
+ e .printStackTrace ();
633
+ }
634
+ }
635
+
620
636
private Locale getLocaleByKey (String instabugLocale ) {
621
637
String localeInLowerCase = instabugLocale .toLowerCase ();
622
638
switch (localeInLowerCase ) {
You can’t perform that action at this time.
0 commit comments