当值需要更新时,我一直在尝试修补Firestore中的集合,但需要使用android中的REST API来完成。
POST在Firestore中不起作用

我找不到任何适合的文档。

结构是
Integer.valueOf(data.getFields()。getOptions()。getMapValue()。getFields()。getOption()。getIntegerValue());
X的范围是1到5
示例:.getOption1()。getIntegerValue();
我正在获取json,并在单击时更新选项字段
但我不知道如何将数据发送回Firestore

没有得到任何回应。

最佳答案

您是否尝试将更新后的值作为GET参数发送?

Uri uri = new Uri.Builder()

.scheme("http")
.authority("example.com")
.path("someurl")
.appendQueryParameter("param1", foo)
.appendQueryParameter("param2", bar)
.build();


问候

关于java - 如何在Android的Cloud Firestore中修补JSON?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55924356/

10-13 07:54