Server List
- Optional. After the player logs in, before entering the game, the player can switch the server. Calling this method will pull up the SDK server list page. If the game uses its own server list page, this method can not be called.
Image
Method
java
public static void gamedreamerServerList(Context context, HashMap<String,String> map,GamedreamerServerListListener gamedreamerServerListListener)Parameters
| Parameter | Description |
|---|---|
| context | Context object. |
| map | The map need to pass a parameter: the key of the parameter is GDValues.USER_ID, the value is Gamedreamer User’s Id. |
| gamedreamerServerListListener | Server list listener. |
Callback Description
GamedreamerServerListListener.onServertList()) callback method description:
- This method is called after the player selects the server on the server list page.
- Return parameter description:
| parameter | description |
|---|---|
| paramServer | Server object that player selected. |
Example Code
java
HashMap<String, String> map = new HashMap<String, String>();
map.put(GDValues.USER_ID, loginUser.getUserId());
GDSDK.gamedreamerServerList(this, map, new GamedreamerServerListListener() {
@Override
public void onServerList(Server paramServer) {
loginServer = paramServer;
}
});