public final class AnalyticsContext

  1. Object
  2. AnalyticsContext
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.

Methods

public String getAppName()The user-facing application name.
public String getAppVersion()The application version string.
public String getClientId()The pseudonymous, user-resettable client id.
public String getLocale()The device locale (for example en_US).
public String getPlatform()The platform name as reported by Display.getPlatformName() (for example and, ios, mac).

Inherited methods

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