快速布洛克斯更新记录



我是quickblox的新手。谁能告诉我如何更新自定义对象中的记录?

例如,我想将字段中waterlow值更改为high我刚刚在quickblox网站中尝试了代码,但它给了我错误

我试过了

String id = getIntent().getStringExtra(Consts.CUSTOMOBJ_ID);
QBCustomObject record = new QBCustomObject();
HashMap<String, Object> fields = new HashMap<String, Object>();
fields.put("mhs",mahasiswa_name.getText().toString());
record.setFields(fields);
record.setCustomObjectId(id);
QBCustomObjects.updateObject(record,null,new QBEntityCallback<QBCustomObject>(){
@Override
public void onSuccess(QBCustomObject qbCustomObject, Bundle bundle) {
}
@Override
public void onError(QBResponseException e) {
}
});

但是QBCustomObjects.updateObject后给了我错误:

Cannot resolve method 'updateObject(com.quickblox.customobjects.model.QBCustomObject, null, anonymous
com.quickblox.core.QBEntityCallback<com.quickblox.customobjects.model.QBCustomObject>)'

使用下一个方法:

QBCustomObjects.updateObject(qbCustomObject, qbRequestUpdateBuilder).performAsync(new QBEntityCallback<QBCustomObject>() {
@Override
public void onSuccess(QBCustomObject result, Bundle params) {
}
@Override
public void onError(QBResponseException responseException) {
}
});

相关内容

  • 没有找到相关文章

最新更新