Firebase Remote Config/Realtime database on Huawei devices

Official Dependencies of Firebase Android SDKs on Google Play services

The following Firebase products depend on Firebase Authentication.

  1. Firebase Realtime Database
  2. Cloud Firestore
  3. Cloud Functions
  4. Cloud Storage

You just need to replace Firebase Authentication with Firebase Auth REST SDK. Using this SDK, you don't need to change your existing Firebase Realtime Database code. It will start working on Huawei devices and also GMS devices as well.

Docs: Firebase Auth REST SDK - How to use Firebase Authentication on HMS phones


Firebase SDKs can be divided into three categories:

  1. Play services required — These SDKs require Google Play services, otherwise they have no functionality.

  2. Play services recommended — These SDKs require Google Play services to have full functionality, but they still offer most functionality even without Google Play services.

  3. Play services not required — These SDKS do not require Google Play services to have full functionality.

List of Firebase SDKs that don't require Google Play services

List of Firebase SDKs that you need to include Google Play services

Remote Config SDK com.google.firebase:firebase-config:20.0.0 doesn't require Google Play Services.

Realtime Database SDK com.google.firebase:firebase-database:19.5.1 doesn't require Google Play Services. But keep in mind that Realtime Database depends on Firebase Auth (it needs an authenticated user to work) which depends on Google Play Services. For that you can use Firebase Auth REST API instead of Firebase Auth SDK.

For more info Use Firebase Authentication without Google Play services


Update 27 Oct 2020:

Firebase Auth SDK v20.0.0 com.google.firebase:firebase-auth:20.0.0 doesn't require Google Play Service.