quickbloxquickblox-android

How to know opponent's platform in quickblox app?


I m integrating quickblox to my app. (iOS & android).

I need to know opponent's platform when making call between each other.

Is there any solution?


Solution

  • You can pass a user's platform in custom parameters in call/accept requests

    http://quickblox.com/developers/Sample-webrtc-android#Start_Call

    Map<String, String> userInfo = new HashMap<>();
    userInfo.put("platform", "iOS");
    
    //Start call
    session.startCall(userInfo);
    
    ...
    
    public void onReceiveNewSession(QBRTCSession session){
    
       // obtain received user info
       Map<String,String> userInfo = session.getUserInfo();
    
       String platform = userInfo.get("platform");
    
    }
    

    the same for 'Accept' http://quickblox.com/developers/Sample-webrtc-android#Accept_call