Android Client Reference
Class Multiplayer
Namespace: com.playerio
Language: Java
The Multiplayer service
Here is an example of joining a multiplayer room and listening to all messages:
Methods | |||
---|---|---|---|
public void |
Creates a multiplayer room (if it does not exist already) and joins it. |
||
public void |
Create a multiplayer room on the Player.IO infrastructure. |
||
public void |
Join a running multiplayer room. |
||
public void |
List the currently running multiplayer rooms. |
||
public void |
If not null, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO servers. |
||
public void |
If true, the multiplayer connections will be encrypted using TLS/SSL. |
Multiplayer.createJoinRoom
public void |
|
Creates a multiplayer room (if it does not exist already) and joins it.
Arguments
String | roomId |
String | roomType |
boolean | visible |
Map<String,String> | roomData |
Map<String,String> | joinData |
Callback<Connection> | callback |
Throws
PlayerIOError |
Multiplayer.createRoom
public void |
|
Create a multiplayer room on the Player.IO infrastructure.
Arguments
String | roomId |
String | roomType |
boolean | visible |
Map<String,String> | roomData |
Callback<String> | callback |
Throws
PlayerIOError |
Multiplayer.joinRoom
public void |
|
Join a running multiplayer room.
Arguments
String | roomId |
Map<String,String> | joinData |
Callback<Connection> | callback |
Throws
PlayerIOError |
Multiplayer.listRooms
public void |
|
List the currently running multiplayer rooms.
Arguments
String | roomType |
Map<String,String> | searchCriteria |
int | resultLimit |
int | resultOffset |
Callback<RoomInfo[]> | callback |
Throws
PlayerIOError |
Multiplayer.setDevelopmentServer
public void |
|
If not null, rooms will be created on the development server at the address defined by the server endpoint, instead of using the live Player.IO servers.
Arguments
ServerEndpoint | developmentServer |
Multiplayer.setUseSecureConnections
public void |
|
If true, the multiplayer connections will be encrypted using TLS/SSL.
Arguments
boolean | value |