【发布时间】:2020-04-12 23:33:47
【问题描述】:
我正在尝试将我刚刚录制的音乐文件传递到 Firebase 中的云功能,但每次尝试上传时都会收到错误消息:
对象不能用 JSON 编码:/storage/emulated/0/tempRecordFile.wav
我的代码:
Map<String, Object> data = new HashMap<>();
data.put("sound", soundFile);
return firebaseFunctions.getHttpsCallable("soundFunction")
.call(data)
.continueWith(new Continuation<HttpsCallableResult, Boolean>() {
@Override
public Boolean then(@NonNull Task<HttpsCallableResult> task) throws Exception {
return (boolean) Objects.requireNonNull(task.getResult()).getData();
}
});
【问题讨论】:
标签: android json firebase google-cloud-functions firebase-storage