how to create room with unique name

0 votes
I want to create a room but only if there are no others room with the same name.
 
If there are a room with the given name, I have to return an error and do not create new room.
 
Maybe I have to get room list with the given name and test if list is empty, but I have to get the list synchronously.
asked Feb 15, 2016 in Android by dario.iannaccone (10 points)

1 Answer

0 votes

Hello Dario,

AppWarp Cloud maintain the room uniqueness based on room_id instead of room name to avoid the room creation calls rejection due to same room name. So, yes, if this is the requirement for your game you can get the all rooms and you can put a check on room name.

Another option is customising server side code, which is possible using AppWarpS2. With AppWarpS2, you can override the server side logic and can do the required customisation. It is an On-Premise solution which you can host on our GPaaS or any 3rd party hosting solutions.

Let me know if you have any further queries.

Thanks.

answered Feb 16, 2016 by rajeev.etc (1,660 points)
TY for reply
but how does it works getRoomWithProperties?
I'm trying with code like this, but this returns all rooms, not only rooms with given name

HashMap < String , Object > properties = new HashMap<String, Object>();
      properties.put("name",name);
      theClient.getRoomWithProperties(properties);
also it is possible to call getRoomWithProperties synchronously.
I'm trying with CountDownLatch
but I'm not so sure that it is the right way
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...