Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Firebase API on Android without the Google Play Service dependency?

I want to develop a Chat App on Android that uses the Firebase API. But the issue I found with the Firebase is that the App will not work properly if the device is no having the Google Play services installed in it.

When I tested the App on my personal device, it wasn't working in it even though the device had the Play Services in it, but an older version. I would really like to remove this dependency of Firebase on the Play services. Is there anyway?

Can we use the options like REST API or the Javascript calls from the mobile devices to connect to firebase?

like image 721
Febin Mathew Avatar asked Sep 22 '17 13:09

Febin Mathew


People also ask

Does Firebase work without Play services?

0 of the Firebase Android BoM), Firebase Authentication no longer depends on Google Play services. This means it is now easy to securely access Firebase products like Cloud Firestore, Realtime Database, and Cloud Storage from any Android device.

How do I use Firebase without a Google account?

Using Firebase requires that you as the developer have a Google account. But your app's users don't need to have a Google account, unless you want them to. In fact, if you don't use Firebase Authentication, you can work with completely unidentified users for most services.

Does Firebase cloud messaging require Google Play services?

FCM clients require devices running Android 4.4 or higher that also have the Google Play Store app installed, or an emulator running Android 4.4 with Google APIs. Note that you are not limited to deploying your Android apps through Google Play Store.


2 Answers

The Firebase SDK for Android is based on Google Play Services.
You can't avoid or skip the dependencies.

If you want to use the REST API you can check the official guide, but only a few services are available.

like image 137
Gabriele Mariotti Avatar answered Oct 05 '22 22:10

Gabriele Mariotti


Here's an example of how to use Firebase Authentication on a device without Google Play services: https://github.com/FirebaseExtended/auth-without-play-services

That will enable you to use Cloud Firestore, Realtime Database, and Cloud Storage on devices without Google Play services as well.

like image 24
Sam Stern Avatar answered Oct 06 '22 00:10

Sam Stern