Calling a Cloud Function from Android through Firebase

前端 未结 4 1140
花落未央
花落未央 2020-12-25 14:53

Situation

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

4条回答
  •  天命终不由人
    2020-12-25 15:19

    firebaser here

    Update: There is now a client-side SDK that allows you to call Cloud Functions directly from supported devices. See Dima's answer for a sample and the latest updates.

    Original answer below...


    @looptheloop88 is correct. There is no SDK for calling Google Cloud Functions from your Android app. I would definitely file a feature request.

    But at the moment that means you should use the regular means of calling HTTP end points from Android:

    • Make an HTTP request with android
    • Android: AsyncTask to make an HTTP GET Request?
    • Http Get using Android HttpURLConnection
    • Android's HTTP Triggers documentation

提交回复
热议问题