diff --git a/Countly.js b/Countly.js index 3391b7e1..69327cfc 100644 --- a/Countly.js +++ b/Countly.js @@ -440,33 +440,25 @@ Countly.configureIntentRedirectionCheck = function (allowedIntentClassNames = [] }; /** + * @deprecated Automatic sessions are handled by underlying SDK, this function will do nothing. * * Countly start for android * * @return {String || void} error message or void */ Countly.start = function () { - if (!_isInitialized) { - const message = "'init' must be called before 'start'"; - Countly.logError('start', message); - return message; - } - CountlyReactNative.start(); + Countly.logWarning('start', "Automatic sessions are handled by underlying SDK, this function will do nothing."); }; /** + * @deprecated Automatic sessions are handled by underlying SDK, this function will do nothing. * * Countly stop for android * * @return {String || void} error message or void */ Countly.stop = function () { - if (!_isInitialized) { - const message = "'init' must be called before 'stop'"; - Countly.logError('stop', message); - return message; - } - CountlyReactNative.stop(); + Countly.logWarning('stop', "Automatic sessions are handled by underlying SDK, this function will do nothing."); }; /** diff --git a/android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java b/android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java index f82fd1a8..d822fff6 100644 --- a/android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java +++ b/android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java @@ -820,16 +820,6 @@ public void configureIntentRedirectionCheck(ReadableArray intentClassNames, Read } } - @ReactMethod - public void start() { - log("onStart", LogLevel.INFO); - } - - @ReactMethod - public void stop() { - log("onStop", LogLevel.INFO); - } - @ReactMethod public void userData_setProperty(ReadableArray args, Promise promise) { Countly.sharedInstance(); diff --git a/ios/src/CountlyReactNative.h b/ios/src/CountlyReactNative.h index 7b387678..31345097 100644 --- a/ios/src/CountlyReactNative.h +++ b/ios/src/CountlyReactNative.h @@ -6,8 +6,6 @@ typedef void (^Result)(id _Nullable result); - (void)event:(NSArray *_Nullable)arguments; - (void)setLoggingEnabled:(NSArray *_Nullable)arguments; -- (void)start; -- (void)stop; - (void)recordView:(NSArray *_Nullable)arguments; - (void)setHttpPostForced:(NSArray *_Nullable)arguments; diff --git a/ios/src/CountlyReactNative.m b/ios/src/CountlyReactNative.m index e70911c6..0d774c68 100644 --- a/ios/src/CountlyReactNative.m +++ b/ios/src/CountlyReactNative.m @@ -365,13 +365,6 @@ + (void)log:(NSString *)theMessage { COUNTLY_RN_LOG(theMessage); } } -RCT_EXPORT_METHOD(start) { - // [Countly.sharedInstance resume]; -} - -RCT_EXPORT_METHOD(stop) { - // [Countly.sharedInstance suspend]; -} RCT_REMAP_METHOD(getCurrentDeviceId, getCurrentDeviceIdWithResolver : (RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject) { dispatch_async(dispatch_get_main_queue(), ^{