We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesAnalytics KitAndroid APIClient APIsanalyticsHiAnalytics

HiAnalytics


Expand
Class info

com.huawei.hms.analytics.HiAnalytics

Provides methods for obtaining HiAnalytics instances.

Public Method Summary

Expand

Qualifier and Type

Method Name and Description

static

getInstance(Activity  context)

Obtains a HiAnalytics instance with the given activity.

static

getInstance(Context  context)

Obtains a HiAnalytics instance with the given context.

Public Methods

getInstance(Activity context)

Expand
Method

public static HiAnalyticsInstance  getInstance(Activity context)

Obtains a HiAnalytics instance with the given context. The Analytics Kit will be initialized in the main thread, based on the configuration.

Parameters

Expand
NameDescription

context

Standard activity in Android.

Return

Expand
TypeDescription

HiAnalyticsInstance

HiAnalytics instance.

getInstance(Context context)

Expand
Method

public static HiAnalyticsInstance  getInstance(Context context)

Obtains a HiAnalytics instance with the given context. The Analytics Kit will be initialized in the main thread, based on the configuration. It is recommended that this API be called in the application section.

Parameters

Expand
NameDescription

context

Standard context in Android.

Return

Expand
TypeDescription

HiAnalyticsInstance

HiAnalytics instance.


This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.