文档管理中心
API参考游戏服务Android游戏接口com.huawei.hms.jos.gamesAppPlayerInfo

AppPlayerInfo

展开

Class Info

public class AppPlayerInfo extends Object

AppPlayerInfo类主要用于保存玩家在游戏内的信息,例如游戏内等级、角色、区服等,供开发者在调用PlayersClient的savePlayerInfo方法时使用。

Public Method Summary

展开

Qualifier and Type

Method Name and Description

String

getRank()

获取玩家在游戏内的等级。

String

getRole()

获取玩家在游戏内的角色。

String

getArea()

获取玩家在游戏内的区服信息。

String

getSociaty()

获取玩家在游戏内的公会信息。

String

getPlayerId()

获取玩家在游戏中的playerId。

String

getOpenId()

获取玩家在游戏中的openId。openId是华为帐号在应用中的唯一标识。

Public Methods

getRank

展开

Method

public String getRank()

获取玩家在游戏内的等级。

Returns

展开

Type

Description

String

玩家在游戏内的等级。

getRole

展开

Method

public String getRole()

获取玩家在游戏内的角色信息。

Returns

展开

Type

Description

String

玩家在游戏内的角色信息。

getArea

展开

Method

public String getArea()

获取玩家在游戏内的区服信息。

Returns

展开

Type

Description

String

玩家在游戏内的区服信息。

getSociaty

展开

Method

public String getSociaty()

获取玩家在游戏内的公会信息。

Returns

展开

Type

Description

String

玩家在游戏内的公会信息。

getPlayerId

展开

Method

public String getPlayerId()

获取玩家在游戏中的playerId。

Returns

展开

Type

Description

String

玩家的playerId。

getOpenId

展开

Method

public String getOpenId()

获取玩家在游戏中的openId。

Returns

展开

Type

Description

String

玩家在游戏中的openId。同一个用户在不同应用中的openId值不同。使用openId标识用户,多个应用之间同一个华为帐号用户在开发者系统内会被标识为多个用户。