Class Info |
|---|
public class AppParams Initialization input parameter class, which is used in the init method. |
Constructors |
|---|
public AppParams() Constructor of the AppParams class. |
public AppParams(AccountAuthParams authScope) Constructor of the AppParams class for joint operations apps. |
public AppParams(AccountAuthParams authScope, AntiAddictionCallback antiaddictionCallback) Constructor of the AppParams class for joint operations games. To implement game addiction prevention, set authScope to AccountAuthParams.DEFAULT_AUTH_REQUEST_PARAM_GAME, and do not leave antiaddictionCallback empty. |
Qualifier and Type | Method Name and Description |
|---|---|
| Obtains the authorization scope of a HUAWEI ID. | |
void | setAuthScope(AccountAuthParams authScope) Sets the authorization scope of a HUAWEI ID. |
| Obtains the game addiction prevention callback. | |
void | setAntiAddictionCallback(AntiAddictionCallback antiAddictionCallback) Sets the game addiction prevention callback. |
String | Obtains the paid traffic channel ID. |
Void | setChannelId(String channelId) Sets the paid traffic channel ID. |
AppParams()
Constructors |
|---|
public AppParams() Constructor of the AppParams class. |
Constructors |
|---|
public AppParams(AccountAuthParams authScope) Constructor of the AppParams class. |
Parameters
Name | Description |
|---|---|
authScope | Authorization parameter used when a HUAWEI ID is used for sign-in.
|
Constructors |
|---|
public AppParams(AccountAuthParams authScope, AntiAddictionCallback antiaddictionCallback) Constructor of the AppParams class. To implement game addiction prevention, set authScope to AccountAuthParams.DEFAULT_AUTH_REQUEST_PARAM_GAME, and do not leave antiaddictionCallback empty. |
Parameters
Name | Description |
|---|---|
authScope | Authorization parameter used when a HUAWEI ID is used for sign-in.
|
antiaddictionCallback | Game addiction prevention callback. In accordance with the latest notice issued by National Press and Publication Administration, online game providers are allowed to offer online game services to minors only from 20:00 to 21:00 on Fridays, weekends, and legal holidays. Game Service automatically collects the played time of minors. When the time exceeds the upper limit, you will receive the result callback. |
Method |
|---|
public AccountAuthParams getAuthScope() Obtains the authorization scope of a HUAWEI ID. |
Returns
Type | Description |
|---|---|
HUAWEI ID authorization parameter. |
Method |
|---|
public void setAuthScope(AccountAuthParams authScope) Sets the authorization scope of a HUAWEI ID. |
Parameters
Name | Description |
|---|---|
authScope | HUAWEI ID authorization scope. For details, please refer to AccountAuthParams.
|
Method |
|---|
public AntiAddictionCallback getAntiAddictionCallback() Obtains the game addiction prevention callback. |
Returns
Type | Description |
|---|---|
Game addiction prevention callback. |
Method |
|---|
public void setAntiAddictionCallback(AntiAddictionCallback antiAddictionCallback) Sets the game addiction prevention callback. |
Parameters
Name | Description |
|---|---|
antiAddictionCallback | Game addiction prevention callback. For details, please refer to AntiAddictionCallback. |