From the lobby, I created a game room using the following code:
Code: Select all
SFSGameSettings settings = new SFSGameSettings("BigTwo Game");
if (((SfsClient) getApplicationContext()).getSelectedGame().equals(getString(R.string.bigTwo))) {
settings.setExtension(new RoomExtension(CardGameConstants.bigTwoGameExtensionId, CardGameConstants.bigTwoGameExtensionClass));
settings.setGame(true);
settings.setMaxSpectators(4);
settings.setMaxUsers(4);
settings.setMinPlayersToStartGame(4);
settings.setName("testsss");
settings.setPublic(true);
}
sfsClient.send(new LeaveRoomRequest());
sfsClient.send(new CreateSFSGameRequest(settings));
finish();
startActivity(new Intent(RoomActivity.this, BigTwoActivity.class));
Now, I fire a an ExtensionRequest from the game room:
Code: Select all
sfsClient.send(new ExtensionRequest("getPlayerPosition", null));
Here is my stacktrace:
I wonder why the lobby extension gets fired as well? I want the game room extension only to get fired.
The game extension init() method:
Code: Select all
addRequestHandler("getPlayerPosition", GetPlayerPositionHandler.class);
addEventHandler(SFSEventType.USER_JOIN_ROOM, JoinHandler.class);
addEventHandler(SFSEventType.USER_LEAVE_ROOM, LeaveHandler.class);
The lobby extension init() method:
Code: Select all
addEventHandler(SFSEventType.USER_LOGIN, LoginHandler.class);
I am using Windows 7 (32bit) and SFS2X RC3 CE.
Thanks a lot for your help