Hi Raul,
Greetings!!!!
Here are the steps that you need to follow to join the room created by your friend.
1. Call getOnlineUsers() API, you will be getting a callback in onGetOnlineUsersDone fucntion of ZoneRequestListener. You can fetch all the coonected users here like.
@Override
public void onGetOnlineUsersDone(AllUsersEvent event) {
for(int i=0; i<event.getUserNames().length; i++){
System.out.println("userName is -"+event.getUserNames()[i]);
}
}
2. As you konw your friend name, you need to validate here if friend is connected then move to next step.
3. Call getAllRooms() API, you will be getting a callback in onGetAllRoomsDone of ZoneRequestListener. here you can fetch all the rooms.
@Override
public void onGetAllRoomsDone(AllRoomsEvent event) {
for(int i=0; i<event.getRoomIds().length; i++){
System.out.println("RoomId "+event.getRoomIds()[i]);
}
}
4. Call getLiveRoomInfo(String roomid) API , You will gets the detail of room in onGetLiveRoomInfoDone like owner Name, If owner is your friend you can join this room.
You can not connect with AppWarp with the same userName, if you want to do so you will be getting Auth Error in response result code.
Let me know if you have more queries.
Thanks
Vishnu Garg