Search code examples
androidfirebasefirebase-mlkit

Can Firebase MLkit be used without enabling billing in developers console?


I am trying to run the quickstart app for MLKit :https://github.com/firebase/quickstart-android/tree/master/mlkit. I have already followed all the steps in firebase console to add the application but I get this error when using this demo application:

E/ImageAnnotatorTask: batchAnnotateImages call failed with error: {"code":403,"errors":[{"domain":"global","message":"This API method requires billing to be enabled. Please enable billing on project #xxxxx by visiting https://console.developers.google.com/billing/enable?project=xxxx then retry.

It seems billing has to be enabled. LivePreviewActivity is working fine but StillImageActivity gives this error.


Solution

  • Yes. Firebase's ML Kit can be used without billing. I have used it underneath the free Spark plan. If you are getting the error above, there are two things that you should check for.

    • You should be under the Spark pricing plan. This is a free, $0 per month, plan
    • Secondly, for Firebase's Spark plan, the Cloud APIs are not available. In order to use the Cloud APIs, you have to upgrade to at least the Blaze plan. Otherwise, you will have to stick to the on-device API.

    The image below shows an example of the different APIs for recognizing text in images and what features they provide.

    enter image description here Essentially, all of the ML Kit's features will work and you have access to them for free - (like Face Detection, Barcode Scanning, and Extracting Text From Images) - but you will have to use the on-device API with your Spark plan unless you are fine with upgrading to use the Cloud APIs.