Febin Mathew
Febin Mathew

Reputation: 1021

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?

Upvotes: 16

Views: 12115

Answers (5)

Mujtaba Fadhil
Mujtaba Fadhil

Reputation: 6116

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

Upvotes: 5

Stefan
Stefan

Reputation: 701

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

Upvotes: 6

Sam Stern
Sam Stern

Reputation: 25134

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.

Upvotes: 7

Gabriele Mariotti
Gabriele Mariotti

Reputation: 365028

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.

Upvotes: 15

ReyAnthonyRenacia
ReyAnthonyRenacia

Reputation: 17651

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.

Upvotes: 4

Related Questions