15
votes

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?

5

5 Answers

15
votes

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.

7
votes

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.

4
votes

I think you can't separate the two as Firebase is part of Google Play Services as mentioned in this post:

Firebase is part of Google Play Services. It is not really a separate SDK. However! Using Google Play Services as a whole is discouraged, to say the least. Developers are encouraged to only pick and choose the play services packages they need. In doing so, they “lose” Firebase capabilities. In order to get them back, you need to specify which Firebase packages you require, just like the other play services packages.

3
votes

Since firebase-auth 20.0.0 on October 27, 2020, Google Play services is not required for login.

See the full list of the dependencies required for Firebase

2
votes

For some of the services, the new versions allow you to use it without Google Play Services

Details here: https://firebase.google.com/docs/android/android-play-services