从Android应用程序

时间:2018-04-05 06:59:51

标签: android firebase google-cloud-functions

FirebaseFunctions.getInstance().getHttpsCallable("onCommentMentionCreated")
                            .call(data);

上面的代码是我用来从Android应用程序调用firebase云功能的代码。用作data函数中的参数的call变量是Hashmap。我想知道如何在服务器端访问它。

1 个答案:

答案 0 :(得分:0)

你应该有一个相应的Callable云函数,如下所示:

exports. onCommentMentionCreated = functions.https.onCall((data, context) => {
  // ...
});

data参数中提供了您从Android应用传递的数据。

要获得比documentation中的摘要更完整的示例,请查看full corresponding Cloud Functions code