1

When submitting dialog to Quickblox I add QBDialogCustomData using the code below

QBDialogCustomData qbDialogCustomData=new QBDialogCustomData("UserInfoDialog");
qbDialogCustomData.putString("FBID1", myApp.getFbid());
qbDialogCustomData.putString("FBID2", fbid);
qbDialogCustomData.putString("USERID1", String.valueOf(myApp.getUserID()));
qbDialogCustomData.putString("USERID2", String.valueOf(userId));
qbDialogCustomData.putString("FULLNAME1", myApp.getFullname());
qbDialogCustomData.putString("FULLNAME2", fullname);
dialog.setCustomData(qbDialogCustomData);

However when later using the getCustomData method it returns null, what is missing to submit the QBDialogCustomData, I have the Custom object class created with the right fields so that shouldn't be an issue.

Cœur
  • 37,241
  • 25
  • 195
  • 267
tihomir981
  • 41
  • 1
  • 4
  • Hi @tihomir981 what version are you using? I'm facing the same problem, and using 3.3.5. When I call putString, the object looks like this ```QBBaseCustomObject{className='Recipents', fields={data[recipients]=30506564,}}``` And if I send update the dialog it doesn't got saved, because I defined the field "recipients" not data[recipients] – fr4gus Oct 06 '17 at 20:00

1 Answers1

0

Im using QuickBlox with RESTFUL API and it works for me if I create the dialog first with the custom data/parameters then send a message but before that you must create the custom object in the admin.quickblox site first. Have you tried that method ?

I referred to this link to create the custom object in the admin quickblox site

Link : http://quickblox.com/developers/Custom_Objects#Create_data_schema

adzhar kahar
  • 41
  • 2
  • 8
  • I have tried the RESTFUL method as well since I found an advice that it should work. However didn't have much success with it. But since they updated the Quickblox version turns out that the issue is fixed in the new versions of the library using the SDK so no need for any complications. Thanks anyway! – tihomir981 Jan 28 '17 at 12:49