File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
android/src/main/java/com/instabug/reactlibrary Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -830,6 +830,21 @@ public void setWillSkipScreenshotAnnotation(boolean willSkipScreenshotAnnotation
830
830
}
831
831
}
832
832
833
+ /**
834
+ * Logs a user event that happens through the lifecycle of the application.
835
+ * Logged user events are going to be sent with each report, as well as at the end of a session.
836
+ *
837
+ * @param {string} name Event name.
838
+ */
839
+ @ ReactMethod
840
+ public void logUserEventWithName (String name ) {
841
+ try {
842
+ mInstabug .logUserEvent (name );
843
+ } catch (java .lang .Exception exception ) {
844
+ exception .printStackTrace ();
845
+ }
846
+ }
847
+
833
848
private InstabugCustomTextPlaceHolder .Key getStringToKeyConstant (String key ) {
834
849
String keyInLowerCase = key .toLowerCase ();
835
850
switch (keyInLowerCase ) {
Original file line number Diff line number Diff line change @@ -460,9 +460,7 @@ module.exports = {
460
460
* @param {string } name Event name.
461
461
*/
462
462
logUserEventWithName : function ( name ) {
463
- if ( Platform . OS == 'ios' ) {
464
- Instabug . logUserEventWithName ( name ) ;
465
- }
463
+ Instabug . logUserEventWithName ( name ) ;
466
464
} ,
467
465
468
466
/**
@@ -472,9 +470,7 @@ module.exports = {
472
470
* @param {Object } params An optional dictionary or parameters to be associated with the event.
473
471
*/
474
472
logUserEventWithNameAndParams : function ( name , params ) {
475
- if ( Platform . OS == 'ios' ) {
476
- Instabug . logUserEventWithNameAndParams ( name , params ) ;
477
- }
473
+ Instabug . logUserEventWithNameAndParams ( name , params ) ;
478
474
} ,
479
475
480
476
/**
You can’t perform that action at this time.
0 commit comments