Calling issues with metaData

Value {“bookingId”:6} at metadata of type java.lang.String cannot be converted to JSONObject
This is the error is recieve when i try to call with metaData, following is the code

@Override
public void sendCallRequest(Context context, String contactUid, String receiverTypeUser, String callType, int booking_id) {

    if (booking_id == -1) {
        booking_id = bookingID;
    }
    Call call = new Call(contactUid, receiverTypeUser, callType);

    JSONObject jsonObject = new JSONObject();
    try {
        jsonObject.put("bookingId", booking_id);
        Log.e("BOOKINGID", "sendmessagePresenter  " + booking_id+" obj "+ jsonObject.toString());
    } catch (JSONException e) {
        Log.e("BOOKINGID", "sendmessagePresneter  " + e.getMessage());
        e.printStackTrace();
    }
    call.setMetadata(jsonObject);

    CometChat.initiateCall(call, new CometChat.CallbackListener<Call>() {
        @Override
        public void onSuccess(Call call) {
            CommonUtils.startCallIntent(context, ((User) call.getCallReceiver()), call.getType(), true, call.getSessionId());
        }

        @Override
        public void onError(CometChatException e) {
            Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();
        }

    });
}

Hi @rizwann,

We have identified the issue at our end and have created a GitHub issue for the same. Please follow the GitHub issue mentioned in the below link to get updates related to this issue.

Please solve this ASAP

How long will you guys take to fix this? I need it get fixed ASAP please

Hi @rizwann,

The issue has been moved from development to testing phase.
It will be released on 17th May which is our standard release cycle period.
Kindly watch the Github issue mentioned above for further updates regarding the issue.

Warm Regards,
Siva
CometChat Team

1 Like

Hi @rizwann,

The fix has been deployed to both EU and US regions.

Warm Regards,

Ketan Yekale
CometChat Pro

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.