Question

I am working in android. I want to create a chat room dynamically using programming.

I am using following code for this:-

     private void createNewRoom()
    {
    // Create a new chat Room
     RoomSettings settings = new RoomSettings("MyChatRoom");
     settings.setMaxUsers(40);
     settings.setGroupId("MyChatRoom");
     sfs.send(new CreateRoomRequest(settings));

    }

Now i want to see that whether this room is created or not. So please suggest me what should i do to check this ? i want to show this created chat room.

Thank you in advance.

Was it helpful?

Solution

I solved my problem.

When we send request to add room dynamically then after your request has sent, we should print list of rooms in that zone.

If you have name of your room in that list this means your room has added.

This code is used to get rooms in particular zone.

sfs.getRoomList()

I hope this will help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top