Class AnalyticsContext

java.lang.Object
com.codename1.analytics.AnalyticsContext

public final class AnalyticsContext extends Object
Immutable bundle of ambient information shared with every provider through AnalyticsProvider.init(AnalyticsContext). The Analytics facade assembles it once from Display properties and the pseudonymous client id so providers do not each have to re-derive it.
  • Method Details

    • getAppName

      public String getAppName()

      The user-facing application name.

      Returns

      the app name

    • getAppVersion

      public String getAppVersion()

      The application version string.

      Returns

      the app version

    • getClientId

      public String getClientId()

      The pseudonymous, user-resettable client id. This is not derived from any hardware identifier and may be cleared via Analytics.resetClientId() to honour erasure requests.

      Returns

      the client id

    • getLocale

      public String getLocale()

      The device locale (for example en_US).

      Returns

      the locale

    • getPlatform

      public String getPlatform()

      The platform name as reported by Display.getPlatformName() (for example and, ios, mac).

      Returns

      the platform name