public static void SetTestOptions(Pcl.IntegrationTesting.AdjustTestOptions testOptions) { if (testOptions.Teardown.HasValue && testOptions.Teardown.Value) { if (AdjustInstance != null) { AdjustInstance.Teardown(); } _isApplicationActive = false; DeviceUtil = null; AdjustInstance = null; AdjustFactory.Teardown(); // check whether to delete state if (testOptions.DeleteState.HasValue && testOptions.DeleteState.Value) { ClearAllPersistedObjects(); ClearAllPeristedValues(); } } if (AdjustInstance == null) { AdjustInstance = new AdjustInstance(); } AdjustInstance.SetTestOptions(testOptions); }
public static void ApplicationLaunching(AdjustConfig adjustConfig) { if (ApplicationLaunched) { return; } AdjustInstance.ApplicationLaunching(adjustConfig, DeviceUtil); RegisterLifecycleEvents(); }
/// <summary> /// Tell Adjust that the application is activated (brought to foreground). /// /// This is used to keep track of the current session state. /// This should only be used if the VisibilityChanged mechanism doesn't work /// </summary> public static void ApplicationActivated() { if (_isApplicationActive) { return; } _isApplicationActive = true; AdjustInstance.ApplicationActivated(); }
/// <summary> /// Tell Adjust that the application is deactivated (sent to background). /// /// This is used to calculate session attributes like session length and subsession count. /// This should only be used if the VisibilityChanged mechanism doesn't work /// </summary> public static void ApplicationDeactivated() { if (!_isApplicationActive) { return; } _isApplicationActive = false; AdjustInstance.ApplicationDeactivated(); }
public static void RemoveSessionPartnerParameter(string key) { AdjustInstance.RemoveSessionPartnerParameter(key); }
/// <summary> /// Tell Adjust that a particular event has happened. /// </summary> /// <param name="adjustEvent"> /// The object that configures the event. <seealso cref="AdjustEvent"/> /// </param> public static void TrackEvent(AdjustEvent adjustEvent) { AdjustInstance.TrackEvent(adjustEvent); }
/// <summary> /// Give user the right to be forgotten in accordance with GDPR law. /// </summary> public static void GdprForgetMe() { AdjustInstance.GdprForgetMe(DeviceUtil); }
public static AdjustAttribution GetAttributon() { return(AdjustInstance.GetAttribution()); }
public static string GetAdid() { return(AdjustInstance.GetAdid()); }
public static void SetPushToken(string pushToken) { AdjustInstance.SetPushToken(pushToken, DeviceUtil); }
public static void SendFirstPackages() { AdjustInstance.SendFirstPackages(); }
public static void ResetSessionPartnerParameters() { AdjustInstance.ResetSessionPartnerParameters(); }
public static void ResetSessionCallbackParameters() { AdjustInstance.ResetSessionCallbackParameters(); }
public static void RemoveSessionCallbackParameter(string key) { AdjustInstance.RemoveSessionCallbackParameter(key); }
public static void AddSessionPartnerParameter(string key, string value) { AdjustInstance.AddSessionPartnerParameter(key, value); }
/// <summary> /// Read the URL that opened the application to search for /// an adjust deep link /// </summary> /// <param name="url">The url that open the application</param> public static void AppWillOpenUrl(Uri uri) { AdjustInstance.AppWillOpenUrl(uri, DeviceUtil); }
/// <summary> /// Puts the SDK in offline or online mode /// </summary> /// <param name="enabled">The flag to enable or disable the adjust SDK</param> public static void SetOfflineMode(bool offlineMode) { AdjustInstance.SetOfflineMode(offlineMode); }
/// <summary> /// Check if the SDK is enabled or disabled /// </summary> /// <returns>true if the SDK is enabled, false otherwise</returns> public static bool IsEnabled() { return(AdjustInstance.IsEnabled()); }
/// <summary> /// Enable or disable the adjust SDK /// </summary> /// <param name="enabled">The flag to enable or disable the adjust SDK</param> public static void SetEnabled(bool enabled) { AdjustInstance.SetEnabled(enabled); }