| Class info |
|---|
com.huawei.hms.analytics.HiAnalytics Provides methods for obtaining HiAnalytics instances. |
Public Method Summary
Qualifier and Type | Method Name and Description |
|---|---|
static | Obtains a HiAnalytics instance with the given activity. |
static | Obtains a HiAnalytics instance with the given context. |
Public Methods
| 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
| Name | Description |
|---|---|
context | Standard activity in Android. |
Return
| Type | Description |
|---|---|
HiAnalyticsInstance | HiAnalytics instance. |
| 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
| Name | Description |
|---|---|
context | Standard context in Android. |
Return
| Type | Description |
|---|---|
HiAnalyticsInstance | HiAnalytics instance. |