我正在尝试将一组对象从Android应用程序发送到云功能。我所没有的。我该如何解决?
在Android方面:
override fun doStuff(input:Set<Dogs>){
val data = hashMapOf("dogs",input)
firebaseFunction.getHttpsCallable("sendDogs")
.call(data).addOnSuccessListener{...}
.addOnFailureListener{...}
}
在服务器端,我只是尝试登录:
exports.sendDogs = functions.https.onCall((data,context) =>{
console.log("DATA:");
console.log(data);
console.log("Data entries::");
console.log(data.entries);
return "this is not logging";
}
如果我使用val data = hashMapOf("dogs",input)
,它不会记录并返回失败
如果我将其替换为val data = "no hashmap just string"
,则效果很好。