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
830830 }
831831 }
832832
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+
833848 private InstabugCustomTextPlaceHolder .Key getStringToKeyConstant (String key ) {
834849 String keyInLowerCase = key .toLowerCase ();
835850 switch (keyInLowerCase ) {
Original file line number Diff line number Diff line change @@ -460,9 +460,7 @@ module.exports = {
460460 * @param {string } name Event name.
461461 */
462462 logUserEventWithName : function ( name ) {
463- if ( Platform . OS == 'ios' ) {
464- Instabug . logUserEventWithName ( name ) ;
465- }
463+ Instabug . logUserEventWithName ( name ) ;
466464 } ,
467465
468466 /**
@@ -472,9 +470,7 @@ module.exports = {
472470 * @param {Object } params An optional dictionary or parameters to be associated with the event.
473471 */
474472 logUserEventWithNameAndParams : function ( name , params ) {
475- if ( Platform . OS == 'ios' ) {
476- Instabug . logUserEventWithNameAndParams ( name , params ) ;
477- }
473+ Instabug . logUserEventWithNameAndParams ( name , params ) ;
478474 } ,
479475
480476 /**
You can’t perform that action at this time.
0 commit comments