目录

SafetyDetect

Class Info

public class SafetyDetect

Entry for obtaining a SafetyDetectClient instance.

Public Method Summary

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.

Public Methods

[h2]getClient(android.content.Context context)

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

SafetyDetectClient

Main entry for calling Safety Detect APIs.

[h2]getClient(android.app.Activity activity)

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

SafetyDetectClient

Main entry for calling Safety Detect APIs.