register method

dynamic register()

Implementation

register() async {
  print("i am in sdk register");

  if (inCall == true) {
    print("i am in call true");
    isCallStart = 1;
  }
  // ref_id = user["ref_id"];
  print("this is reference id ${ref_id}");
  Map<String, dynamic> registerjson = {
    "type": "request",
    "requestType": "register",
    "deviceId": deviceId,
    "requestId": _generateMd5(
        DateTime.now().millisecondsSinceEpoch.toString() +
            tenantID +
            ref_id!),
    "projectId": project_ID,
    "referenceId": ref_id,
    "authorizationToken": authorizationToken,
    "socketType": 0,
    "reConnect": isCallStart
  };

  print("this is json in register request $registerjson");
  _socket?.send(registerjson);
}