Class MyTrackerConfig


  • public final class MyTrackerConfig
    extends java.lang.Object
    Class for configuring myTracker
    • Method Detail

      • getBufferingPeriod

        @AnyThread
        public int getBufferingPeriod()
        Return buffering period. During this period every tracked event is stored in local storage.

        The value is in range [1 - 86400]. Default value is 900 seconds.

        Returns:
        Buffering period.
      • getAntiFraudConfig

        @AnyThread
        @NonNull
        public AntiFraudConfig getAntiFraudConfig()
        Return current anti-fraud configuration.
        Returns:
        The current instance of AntiFraudConfig.
      • setBufferingPeriod

        @AnyThread
        @NonNull
        public MyTrackerConfig setBufferingPeriod​(int bufferingPeriodSec)
        Set the buffering period.

        NOTE: it's recommended to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        bufferingPeriodSec - Buffering period in seconds. The value should be in range [1 - 86400]. Otherwise it will be rejected.
        Returns:
        The current instance of MyTrackerConfig.
      • getForcingPeriod

        @AnyThread
        public int getForcingPeriod()
        Return forcing period in seconds. During this period every tracked event leads to flushing tracker. The start of the period is install or update of application.

        The value is in range [0 - 432000]. Default value is 0. It means, that forcing period is disabled by default.

        Returns:
        Forcing period.
      • setForcingPeriod

        @AnyThread
        @NonNull
        public MyTrackerConfig setForcingPeriod​(int forcingPeriodSec)
        Set the forcing period.

        NOTE: it's recommended to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        forcingPeriodSec - Forcing period in seconds. The value should be in range [0 - 432000]. Otherwise it will be rejected.
        Returns:
        The current instance of MyTrackerConfig.
      • getLaunchTimeout

        @AnyThread
        public int getLaunchTimeout()
        Return launch timeout in in seconds. During this period start of the application after it close wont't be considered as new launch.

        The value is in range [30 - 7200]. Default value is 30.

        Returns:
        Launch timeout.
      • setProxyHost

        @AnyThread
        @NonNull
        public MyTrackerConfig setProxyHost​(@Nullable
                                            java.lang.String proxyHost)
        Set the host to which all requests will be sent.

        The value provided in parameter will be additionally processed: - HTTPS scheme could be added if necessary - Query and Fragment parts will be deleted - the protocol version will be added

        To reset proxy host to default call the method with null parameter.

        NOTE: it's mandatory to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        proxyHost - Proxy host.
        Returns:
        The current instance of MyTrackerConfig.
      • getVendorAppPackage

        @AnyThread
        @Deprecated
        @Nullable
        public java.lang.String getVendorAppPackage()
        Deprecated.
      • setDefaultVendorAppPackage

        @AnyThread
        @Deprecated
        @NonNull
        public MyTrackerConfig setDefaultVendorAppPackage()
        Deprecated.
      • setVendorAppPackage

        @AnyThread
        @Deprecated
        @NonNull
        public MyTrackerConfig setVendorAppPackage​(@Nullable
                                                   java.lang.String vendorAppPackage)
        Deprecated.
      • isTrackingEnvironmentEnabled

        @AnyThread
        public boolean isTrackingEnvironmentEnabled()
        Return tracking environment state. Enabled state means that information about Wi-Fi and mobile networks will be collected.

        NOTE: this information are collected while sending request to the server. The impact to the battery is minimal.

        Returns:
        Tracking environment state.
      • setTrackingEnvironmentEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setTrackingEnvironmentEnabled​(boolean trackingEnvironmentEnabled)
        Enable or disable collecting environment information.

        NOTE: it's recommended to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        trackingEnvironmentEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • isTrackingLaunchEnabled

        @AnyThread
        public boolean isTrackingLaunchEnabled()
        Return whether tracking application launches is enabled or not.
        Returns:
        The state of tracking launches feature.
      • setTrackingLaunchEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setTrackingLaunchEnabled​(boolean trackingLaunchEnabled)
        Enable or disable tracking application launches.

        NOTE: it's mandatory to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        trackingLaunchEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • isTrackingLocationEnabled

        @AnyThread
        public boolean isTrackingLocationEnabled()
        Return whether collecting current location is enabled or not.

        NOTE: this information are collected while sending request to the server. The impact to the battery is minimal.

        Returns:
        The state of tracking location feature.
      • setTrackingLocationEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setTrackingLocationEnabled​(boolean trackingLocationEnabled)
        Enable or disable collecting information about current location.

        NOTE: it's recommended to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        trackingLocationEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • setAutotrackingPurchaseEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setAutotrackingPurchaseEnabled​(boolean autotrackingPurchaseEnabled)
        Enable or disable autotracking purchases.

        NOTE: it's recommended to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        autotrackingPurchaseEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • isTrackingPreinstallEnabled

        @AnyThread
        public boolean isTrackingPreinstallEnabled()
        Return whether tracking preinstall of current application is enabled or not.
        Returns:
        The state of tracking preinstall feature.
      • setTrackingPreinstallEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setTrackingPreinstallEnabled​(boolean trackingPreinstallEnabled)
        Enable or disable tracking preinstall.

        NOTE: it's mandatory to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        trackingPreinstallEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • isTrackingPreinstallThirdPartyEnabled

        @AnyThread
        public boolean isTrackingPreinstallThirdPartyEnabled()
        Return whether tracking preinstall of current application with third party sources is enabled or not.
        Returns:
        The state of tracking preinstall feature.
      • setTrackingPreinstallThirdPartyEnabled

        @AnyThread
        @NonNull
        public MyTrackerConfig setTrackingPreinstallThirdPartyEnabled​(boolean trackingPreinstallThirdPartyEnabled)
        Enable or disable tracking preinstall with third party sources.

        NOTE: it's mandatory to call this method before MyTracker.initTracker(String, Application) call.

        Parameters:
        trackingPreinstallThirdPartyEnabled - The enable or disable state.
        Returns:
        The current instance of MyTrackerConfig.
      • setApkPreinstallParams

        @AnyThread
        @NonNull
        public MyTrackerConfig setApkPreinstallParams​(@Nullable
                                                      java.lang.String apkPreinstallParams)
        Set apkPreinstallParams
        Parameters:
        apkPreinstallParams - String
        Returns:
        The current instance of MyTrackerConfig.
      • getApkPreinstallParams

        @AnyThread
        @Nullable
        public java.lang.String getApkPreinstallParams()
        Return apkPreinstallParams String