Android Tutorial Integrating Firebase Services

Not open for further replies.
Google has acquired a company named Firebase and is now offering many backend services under the Firebase umbrella. Most of them are free.

Integrating the services is relatively simple.

1. Use B4A Sdk Manager tool to install all recommended items.

2. Register with Firebase and create a new project:
Make sure that the package name matches your app's package name.

3. Download google-services.json and put it in the projects folder (folder of the b4a file).

4. Add the manifest snippets to the manifest editor based on the services that you need.

5. Follow the instructions of the specific libraries.

Note that a recent version of Google Play Services should be installed on the device.
The minimum version of most features is 4.0 (API 14).
You can test whether Google Play Services is available with FirebaseAnalytics.IsGooglePlayServicesAvailable or with:

Google Play Services Base - Always required when using Google Play Services or Firebase:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
Firebase - Always required when using Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
Firebase Notifications / Push messages
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
Firebase Analytics
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
Firebase Ads
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
Firebase Auth
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
Last edited:
Not open for further replies.