I have created a Google Cloud Function through functions.https.onRequest, which is working nicely when I paste its URL in a browser and integ
implementation 'com.google.firebase:firebase-functions:16.1.0'
private FirebaseFunctions mFunctions;
mFunctions = FirebaseFunctions.getInstance();
private Task addMessage(String text) {
Map data = new HashMap<>();
data.put("text", text);
data.put("push", true);
return mFunctions
.getHttpsCallable("addMessage")
.call(data)
.continueWith(new Continuation() {
@Override
public String then(@NonNull Task task) throws Exception {
// This continuation runs on either success or failure, but if the task
// has failed then getResult() will throw an Exception which will be
// propagated down.
String result = (String) task.getResult().getData();
return result;
}
});
}
Ref : Calling Firebase cloud functions