QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
396 stars 358 forks source link

Calling issue android to ios app background and close/. #1330

Closed jainSamy closed 1 year ago

jainSamy commented 2 years ago

Hello ,

  1. I am Working on quickblox Voip call from Android to IOS when app background and app is closed call not received from Ios side.
  2. Is working fine when app foreground.

I am this this request in QBEvent qbEvent = new QBEvent(); qbEvent.setNotificationType(QBNotificationType.PUSH); qbEvent.setEnvironment(QBEnvironment.DEVELOPMENT); StringifyArrayList userIds = new StringifyArrayList<>(recipients);

// On conditional qbEvent.setPushType(QBPushType.APNS_VOIP);

JSONObject json = new JSONObject(); try { json.put("message", outMessage); json.put("ios_voip", "1"); json.put("VOIPCall", "1"); json.put("sessionID", sessionID); json.put("opponentsIDs", CallerID + "," + recipients.get(0)); json.put("contactIdentifier", senderName + "," + toCall); json.put("caller_name", senderName); json.put("conferenceType", "2"); json.put("device", "android"); } catch (JSONException e) { e.printStackTrace(); }

    qbEvent.setUserIds(userIds);

    qbEvent.setMessage(json.toString());

QBPushNotifications.createEvent(qbEvent).performAsync(new QBEntityCallback()

Tell me where i am wrong.

  1. Second thing is how can i send below type of request on ios side when call from android side how can is send this type of request send from android . ncoming calling ***** log=== [AnyHashable("aps"): { alert = "Dr. xyz is calling you."; }, AnyHashable("caller_pic"): profile_pic/1663577401252.jpg, AnyHashable("sessionID"): 066E1967-82F5-471D-81D5-86C5F60B4DFD, AnyHashable("conferenceType"): 2, AnyHashable("contactIdentifier"): Dr. xyz ,Dr.abc , AnyHashable("VOIPCall"): 1, AnyHashable("opponentsIDs"): 135767670,135768046, AnyHashable("caller_name"): xyz, AnyHashable("param"): 10674,1, AnyHashable("timestamp"): 1663743498856]

Thanks in advanced

IlliaChemolosov commented 1 year ago

Hello @test-adarsh , This is Illia from Quickblox

In this case you need to add "ios_voip": 1 to the event body. This explains to the server that the push should be with type VOIP if the device is subscribed to the push from iOS.