Class Info |
|---|
public class SafetyDetect Entry for obtaining a SafetyDetectClient instance. |
Qualifier and Type | Method Name and Description |
|---|---|
static SafetyDetectClient | getClient(android.content.Context context) Obtains a SafetyDetectClient object, which is used to call Safety Detect APIs. |
static SafetyDetectClient | getClient(android.app.Activity activity) Obtains a SafetyDetectClient object, which is used to call Safety Detect APIs. |
Method |
|---|
public static SafetyDetectClient getClient (android.content.Context context) Obtains a SafetyDetectClient object, which is used to call Safety Detect APIs. |
If the passed parameter is not of the Activity type and an error occurs when the SafetyDetectClient instance is used to call Safety Detect APIs, the app only returns an error code but does not display the interaction UI to prompt the user to handle the error.
Parameters
Name | Description |
|---|---|
context | Context of an Android app. |
Returns
Type | Description |
|---|---|
Main entry for calling Safety Detect APIs. |
Method |
|---|
public static SafetyDetectClient getClient (android.app.Activity activity) Obtains a SafetyDetectClient object, which is used to call Safety Detect APIs. |
If the passed parameter is of the Activity type and an error occurs when the SafetyDetectClient instance is used to call Safety Detect APIs, the app displays the interaction UI to prompt the user to handle the error.
Parameters
Name | Description |
|---|---|
activity | Activity of an Android app. |
Returns
Type | Description |
|---|---|
Main entry for calling Safety Detect APIs. |