Hi Jitesh,
Thanks for code sharing. After going through with the server side code I have modified Room Creation code snippet that will help to override the AppWarpS2 functionality.
@Override
public void handleCreateRoomRequest(IUser user, IRoom room, HandlingResult result) {
System.out.println("Room Created " + room.getName() + " by " + user.getName() + " with ID " + room.getId() + " Max users in the room :: " + room.getMaxUsers());
QuizUtils.roomCreatedByUser = user;
System.out.println("RoomCreated By user :: " + QuizUtils.roomCreatedByUser.getName());
System.out.println(this.zone.getName() + " - rooms :: " + this.zone.getRooms().size() + " - users :: " + this.zone.getUsers().size() );
room.setAdaptor(new QuizRoomAdaptor(this.zone, (ITurnBasedRoom) room));
}
You can directly replace the above function code in QuizZoneAdaptor.java class.
Please don't use static variable to save room owner name like : "QuizUtils.roomCreatedByUser = user"
It can create several conflicts when multiple users want to create a Room on server, at that time that variable is updated and again there may be issue in functionality.
You can avoid this by using Map with Room-ID as a key and Owner as a value.
Let me know if more queries are concern.
Thanks & Regards
Vishnu Garg
AppWarp Support Team