handleUserJoinRequest() not get triggered on the server

0 votes

When I create a dynamic room and then join that room using WarpClient.GetInstance().JoinRoom(roomId), I got an event handleUserJoinRequest() on the server and everything is working fine

When I create a static room using the web interface then join that room using WarpClient.GetInstance().JoinRoom(roomId), on the client side I got onJoinRoomDone with the SUCCESS status, but on the server side, the handleUserJoinRequest() never get triggered.

Please tell me what's wrong, how do I join the static room

Thanks.

asked Feb 16, 2017 in AppWarpS2 by Manhson Tran (10 points)

1 Answer

0 votes

Hi Manhson,

Greetings from ShepHertz!!!!!

As AppWarpS2 provides you functionality to write custom business logic on server.While customization logic on AppWarapS2 you need to override the default logic availbale on AppWarpS2.

It has some predefined steps.

  • Need to override BaseServerAdaptor with your ServerExtensionClass.
  • Need to override BaseZoneAdaptor with your own Zone Extension.
  • In ZoneExtensionneed to override handleCreateRoomRequest.
  • In handlecreateRoomRequest you need to create room with your own RoomAdapter in which you are extending AppWarp functionlaity.
  • In your RoomAdapter you can override all the methods like handleUserJoinRequest or more.

Let me know that you are following all the steps, if some steps is missing than default logic will work and you overrided function will not called.

Let me know the details.

Thanks

Vishnu Garg

 

answered Feb 17, 2017 by Vishnu Garg (674 points)
Hi, just to be cleared, I ran your Quiz_WindowsPhone sample code, so all the methods that need to override already been done

- I DO NOT have any problem when a user joins the dynamic room
- I ONLY have problem when a user try to join the static room

The problem is the handleUserJoinRequest() NOT get triggered when the user joins the static room while it get triggered when the user joins the dynamic room

Thanks.
As static rooms are created by Admin, you need to override onAdminRoomAdded function to achieve same functionality on AppWarp Server.
You can use following code in your QuizZoneAdapter.java class.

 @Override
    public void onAdminRoomAdded(IRoom room) {
        System.out.println("Room Created " + room.getName() + " with ID " + room.getId());
        room.setAdaptor(new QuizRoomAdaptor(this.zone, room));
    }
Great, it works as expected now.
Thanks Vishnu Garg
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
...