File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
android/src/main/java/com/mparticle/react Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ public String getName() {
6262 return "MParticle" ;
6363 }
6464
65+ @ ReactMethod
66+ public void upload () {
67+ MParticle .getInstance ().upload ();
68+ }
69+
6570 @ ReactMethod
6671 public void logEvent (final String name , int type , final ReadableMap attributesMap ) {
6772 Map <String , String > attributes = ConvertStringMap (attributesMap );
Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ + (void)load {
1919 RCTRegisterModule (self);
2020}
2121
22+ RCT_EXPORT_METHOD (upload)
23+ {
24+ [[MParticle sharedInstance ] upload ];
25+ }
26+
2227RCT_EXPORT_METHOD (logEvent:(NSString *)eventName type:(NSInteger )type attributes:(NSDictionary *)attributes)
2328{
2429 [[MParticle sharedInstance ] logEvent: eventName eventType: type eventInfo: attributes];
Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ const ATTAuthStatus = {
8484
8585// ******** Main API ********
8686
87+ const upload = ( ) => {
88+ NativeModules . MParticle . upload ( )
89+ }
90+
8791const logEvent = ( eventName , type = EventType . Other , attributes = null ) => {
8892 NativeModules . MParticle . logEvent ( eventName , type , attributes )
8993}
@@ -660,6 +664,7 @@ const MParticle = {
660664 GDPRConsent,
661665 CCPAConsent,
662666
667+ upload,
663668 logEvent, // Methods
664669 logMPEvent,
665670 logCommerceEvent,
You can’t perform that action at this time.
0 commit comments