how getJoinedUsers() works?

0 votes
currently I am using this method

public void onGetLiveRoomInfoDone (LiveRoomInfoEvent eventObj)

{

            string[] users = eventObj.getJoinedUsers();

            if(users != null && users.Length > 0)
            Log("onGetLiveRoomInfoDone users : " + eventObj.getJoinedUsers().Length);
            else
            Log("onGetLiveRoomInfoDone users : null");

}

 

but this always returns null even if i have other players connected. how do I get number of users and its info in particular room?
closed with the note: Closing this thread as there was no update from last 2 Weeks or more. Please raise a new query if problem persists.
asked Jul 8, 2014 in App42 Cloud API-BaaS by patel.sagar2611 (34 points)
closed Sep 17, 2014 by sushil
Can you check what is the result code in the event object? Only if its success (i.e. 0) and if there are users joined in the room whose information is requested - will the event contain the joined users.
yes I am getting success(i.e. 0) and also there are users in the room. still I get null.
I've tried this out and its working fine. Here are the code snippets

    @Override
    public void onGetLiveRoomInfoDone(LiveRoomInfoEvent event) {
        System.out.println("onGetLiveRoomInfoDone: "+event.getResult());
        if(event.getResult() == WarpResponseResultCode.SUCCESS){
            String[] users = event.getJoinedUsers();   
            String result = "";
            if(users != null ){
                for(int i=0; i<users.length; i++){
                    result += " "+users[i];                
                }
            }
        }
    }

I connect, join room x, call getLiveRoomInfo(x) and then get the response.

Can you share your application code in which this issue reproduces? We can then let you know what the problem might be.
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
...