public static void Start(AdjustConfig adjustConfig) { string appToken = adjustConfig.appToken != null ? adjustConfig.appToken : "ADJ_INVALID"; string sceneName = adjustConfig.sceneName != null ? adjustConfig.sceneName : "ADJ_INVALID"; string userAgent = adjustConfig.userAgent != null ? adjustConfig.userAgent : "ADJ_INVALID"; string defaultTracker = adjustConfig.defaultTracker != null ? adjustConfig.defaultTracker : "ADJ_INVALID"; string externalDeviceId = adjustConfig.externalDeviceId != null ? adjustConfig.externalDeviceId : "ADJ_INVALID"; string environment = adjustConfig.environment.ToLowercaseString(); long info1 = AdjustUtils.ConvertLong(adjustConfig.info1); long info2 = AdjustUtils.ConvertLong(adjustConfig.info2); long info3 = AdjustUtils.ConvertLong(adjustConfig.info3); long info4 = AdjustUtils.ConvertLong(adjustConfig.info4); long secretId = AdjustUtils.ConvertLong(adjustConfig.secretId); double delayStart = AdjustUtils.ConvertDouble(adjustConfig.delayStart); int logLevel = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel); int isDeviceKnown = AdjustUtils.ConvertBool(adjustConfig.isDeviceKnown); int sendInBackground = AdjustUtils.ConvertBool(adjustConfig.sendInBackground); int eventBufferingEnabled = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled); int allowiAdInfoReading = AdjustUtils.ConvertBool(adjustConfig.allowiAdInfoReading); int allowIdfaReading = AdjustUtils.ConvertBool(adjustConfig.allowIdfaReading); int allowSuppressLogLevel = AdjustUtils.ConvertBool(adjustConfig.allowSuppressLogLevel); int launchDeferredDeeplink = AdjustUtils.ConvertBool(adjustConfig.launchDeferredDeeplink); int isAttributionCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getAttributionChangedDelegate() != null); int isEventSuccessCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getEventSuccessDelegate() != null); int isEventFailureCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getEventFailureDelegate() != null); int isSessionSuccessCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getSessionSuccessDelegate() != null); int isSessionFailureCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getSessionFailureDelegate() != null); int isDeferredDeeplinkCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getDeferredDeeplinkDelegate() != null); _AdjustLaunchApp( appToken, environment, sdkPrefix, userAgent, defaultTracker, externalDeviceId, sceneName, allowSuppressLogLevel, logLevel, isDeviceKnown, eventBufferingEnabled, sendInBackground, allowiAdInfoReading, allowIdfaReading, secretId, info1, info2, info3, info4, delayStart, launchDeferredDeeplink, isAttributionCallbackImplemented, isEventSuccessCallbackImplemented, isEventFailureCallbackImplemented, isSessionSuccessCallbackImplemented, isSessionFailureCallbackImplemented, isDeferredDeeplinkCallbackImplemented); }
public void start(AdjustConfig adjustConfig) { string appToken = adjustConfig.appToken; string sceneName = adjustConfig.sceneName; string environment = adjustConfig.environment.lowercaseToString(); int logLevel = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel); int eventBufferingEnabled = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled); _AdjustLaunchApp(appToken, environment, sdkPrefix, logLevel, eventBufferingEnabled, sceneName); }
public static void TrackThirdPartySharing(AdjustThirdPartySharing thirdPartySharing) { int enabled = AdjustUtils.ConvertBool(thirdPartySharing.isEnabled); List <string> jsonGranularOptions = new List <string>(); foreach (KeyValuePair <string, List <string> > entry in thirdPartySharing.granularOptions) { jsonGranularOptions.Add(entry.Key); jsonGranularOptions.Add(AdjustUtils.ConvertListToJson(entry.Value)); } _AdjustTrackThirdPartySharing(enabled, AdjustUtils.ConvertListToJson(jsonGranularOptions)); }
public static void TrackEvent(AdjustEvent adjustEvent) { int isReceiptSet = AdjustUtils.ConvertBool(adjustEvent.isReceiptSet); double revenue = AdjustUtils.ConvertDouble(adjustEvent.revenue); string eventToken = adjustEvent.eventToken; string currency = adjustEvent.currency; string receipt = adjustEvent.receipt; string transactionId = adjustEvent.transactionId; string stringJsonCallBackParameters = AdjustUtils.ConvertListToJson(adjustEvent.callbackList); string stringJsonPartnerParameters = AdjustUtils.ConvertListToJson(adjustEvent.partnerList); _AdjustTrackEvent(eventToken, revenue, currency, receipt, transactionId, isReceiptSet, stringJsonCallBackParameters, stringJsonPartnerParameters); }
public void start(AdjustConfig adjustConfig) { string appToken = adjustConfig.appToken; string sceneName = adjustConfig.sceneName; string userAgent = adjustConfig.userAgent != null ? adjustConfig.userAgent : String.Empty; string environment = adjustConfig.environment.lowercaseToString(); double delayStart = AdjustUtils.ConvertDouble(adjustConfig.delayStart); int logLevel = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel); int sendInBackground = AdjustUtils.ConvertBool(adjustConfig.sendInBackground); int eventBufferingEnabled = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled); int allowSuppressLogLevel = AdjustUtils.ConvertBool(adjustConfig.allowSuppressLogLevel); int launchDeferredDeeplink = AdjustUtils.ConvertBool(adjustConfig.launchDeferredDeeplink); _AdjustLaunchApp(appToken, environment, sdkPrefix, allowSuppressLogLevel, logLevel, eventBufferingEnabled, sendInBackground, delayStart, userAgent, launchDeferredDeeplink, sceneName); }
public void start(AdjustConfig adjustConfig) { string appToken = adjustConfig.appToken; string sceneName = adjustConfig.sceneName; string userAgent = adjustConfig.userAgent != null ? adjustConfig.userAgent : String.Empty; string environment = adjustConfig.environment.lowercaseToString(); double delayStart = AdjustUtils.ConvertDouble(adjustConfig.delayStart); int logLevel = AdjustUtils.ConvertLogLevel(adjustConfig.logLevel); int sendInBackground = AdjustUtils.ConvertBool(adjustConfig.sendInBackground); int eventBufferingEnabled = AdjustUtils.ConvertBool(adjustConfig.eventBufferingEnabled); int allowSuppressLogLevel = AdjustUtils.ConvertBool(adjustConfig.allowSuppressLogLevel); int launchDeferredDeeplink = AdjustUtils.ConvertBool(adjustConfig.launchDeferredDeeplink); int isAttributionCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getAttributionChangedDelegate() != null); int isEventSuccessCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getEventSuccessDelegate() != null); int isEventFailureCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getEventFailureDelegate() != null); int isSessionSuccessCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getSessionSuccessDelegate() != null); int isSessionFailureCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getSessionFailureDelegate() != null); int isDeferredDeeplinkCallbackImplemented = AdjustUtils.ConvertBool(adjustConfig.getDeferredDeeplinkDelegate() != null); _AdjustLaunchApp( appToken, environment, sdkPrefix, allowSuppressLogLevel, logLevel, eventBufferingEnabled, sendInBackground, delayStart, userAgent, launchDeferredDeeplink, sceneName, isAttributionCallbackImplemented, isEventSuccessCallbackImplemented, isEventFailureCallbackImplemented, isSessionSuccessCallbackImplemented, isSessionFailureCallbackImplemented, isDeferredDeeplinkCallbackImplemented); }
public static void SetTestOptions(AdjustTestOptions testOptions) { long timerIntervalMls = testOptions.TimerIntervalInMilliseconds.HasValue ? testOptions.TimerIntervalInMilliseconds.Value : -1; long timerStartMls = testOptions.TimerStartInMilliseconds.HasValue ? testOptions.TimerStartInMilliseconds.Value : -1; long sessionIntMls = testOptions.SessionIntervalInMilliseconds.HasValue ? testOptions.SessionIntervalInMilliseconds.Value : -1; long subsessionIntMls = testOptions.SubsessionIntervalInMilliseconds.HasValue ? testOptions.SubsessionIntervalInMilliseconds.Value : -1; bool teardown = testOptions.Teardown.HasValue ? testOptions.Teardown.Value : false; bool deleteState = testOptions.DeleteState.HasValue ? testOptions.DeleteState.Value : false; _AdjustSetTestOptions( testOptions.BaseUrl, testOptions.BasePath, testOptions.GdprUrl, testOptions.GdprPath, timerIntervalMls, timerStartMls, sessionIntMls, subsessionIntMls, AdjustUtils.ConvertBool(teardown), AdjustUtils.ConvertBool(deleteState)); }
// Used for testing only. public static void SetTestOptions(Dictionary <string, string> testOptions) { string baseUrl = testOptions[AdjustUtils.KeyTestOptionsBaseUrl]; string gdprUrl = testOptions[AdjustUtils.KeyTestOptionsGdprUrl]; string subscriptionUrl = testOptions[AdjustUtils.KeyTestOptionsSubscriptionUrl]; string extraPath = testOptions.ContainsKey(AdjustUtils.KeyTestOptionsExtraPath) ? testOptions[AdjustUtils.KeyTestOptionsExtraPath] : null; long timerIntervalMilis = -1; long timerStartMilis = -1; long sessionIntMilis = -1; long subsessionIntMilis = -1; bool teardown = false; bool deleteState = false; bool noBackoffWait = false; bool iAdFrameworkEnabled = false; bool adServicesFrameworkEnabled = false; if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTimerIntervalInMilliseconds)) { timerIntervalMilis = long.Parse(testOptions[AdjustUtils.KeyTestOptionsTimerIntervalInMilliseconds]); } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTimerStartInMilliseconds)) { timerStartMilis = long.Parse(testOptions[AdjustUtils.KeyTestOptionsTimerStartInMilliseconds]); } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsSessionIntervalInMilliseconds)) { sessionIntMilis = long.Parse(testOptions[AdjustUtils.KeyTestOptionsSessionIntervalInMilliseconds]); } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsSubsessionIntervalInMilliseconds)) { subsessionIntMilis = long.Parse(testOptions[AdjustUtils.KeyTestOptionsSubsessionIntervalInMilliseconds]); } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsTeardown)) { teardown = testOptions[AdjustUtils.KeyTestOptionsTeardown].ToLower() == "true"; } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsDeleteState)) { deleteState = testOptions[AdjustUtils.KeyTestOptionsDeleteState].ToLower() == "true"; } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsNoBackoffWait)) { noBackoffWait = testOptions[AdjustUtils.KeyTestOptionsNoBackoffWait].ToLower() == "true"; } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsiAdFrameworkEnabled)) { iAdFrameworkEnabled = testOptions[AdjustUtils.KeyTestOptionsiAdFrameworkEnabled].ToLower() == "true"; } if (testOptions.ContainsKey(AdjustUtils.KeyTestOptionsAdServicesFrameworkEnabled)) { adServicesFrameworkEnabled = testOptions[AdjustUtils.KeyTestOptionsAdServicesFrameworkEnabled].ToLower() == "true"; } _AdjustSetTestOptions( baseUrl, gdprUrl, subscriptionUrl, extraPath, timerIntervalMilis, timerStartMilis, sessionIntMilis, subsessionIntMilis, AdjustUtils.ConvertBool(teardown), AdjustUtils.ConvertBool(deleteState), AdjustUtils.ConvertBool(noBackoffWait), AdjustUtils.ConvertBool(iAdFrameworkEnabled), AdjustUtils.ConvertBool(adServicesFrameworkEnabled)); }
public static void TrackMeasurementConsent(bool enabled) { _AdjustTrackMeasurementConsent(AdjustUtils.ConvertBool(enabled)); }
public static void SetOfflineMode(bool enabled) { _AdjustSetOfflineMode(AdjustUtils.ConvertBool(enabled)); }
public static void SetEnabled(bool enabled) { _AdjustSetEnabled(AdjustUtils.ConvertBool(enabled)); }