Firebase App Distribution for Android

Andrés Micó
Jeff Tech
Published in
5 min readFeb 20, 2020

Firebase app distribution is here and has come to stay 🎉🔥

If you are using Fabric for crash reporting and for distributing pre-releases to your testers, you should know that Fabric will be deprecated on March 31, 2020. Luckily, Firebase offers developers even more features compared to Fabric. In this post, I’ll explain how to upload your Android app’s beta build to Firebase App Distribution using an example. I will also cover how to automatically deliver this beta build to the testers by just pressing one command.

Why Firebase? 🤔

Firebase is an ecosystem that provides us an easy way to develop our applications, although there are other platforms for manage the beta releases, like Google Play Internal Test Platform for Android, TestFlight for iOS, Diawi or AppBox, the set up of all of them is more complicated and takes much time than App Distribution.

Firstly, Firebase is a cross-platform which means that developers can manage iOS and Android pre-release distributions in the same platform. Secondly, Firebase is faster and user friendly compared to other platforms which helps developers make their releases available to testers more quickly. For example, the builds on TestFlight must go through an approval process before being available to the testers. This approval process is absent when using Firebase! Moreover, Firebase installation doesn’t need custom SDK because it is an instant app delivery. Finally, Firebase fits in all workflows.

All these reasons make Firebase App Distribution a clear winner when it comes to beta distribution.

Setting up 👩‍💻👨‍💻

The first step is to create a new project on Firebase. Let’s call this project SuperCoolApp 😏

The second step is to register your Android app as part of the project that you have already created (SuperCoolApp). Firebase provides the users with documentation so new users can easily learn how to initialize an Android project. You can check out the documentation here.

Who is going to test your app? 🔍

Once you have set up the environment in Firebase, you can turn our attention to the three tabs that appear on the app distribution section.

  • Versions: Here the user can find the builds deployed and some info about each one.
  • Invitation links: This tab allows the users to share the builds using a link.
  • Testers and groups: Users will be able to manage their testers/developers emails from here.

How to upload your build?

Firebase gives the users the possibility to upload and distribute their builds in different ways. Although I chose Firebase CLI for this example, here you have the rest of the options available:

  • Firebase Console: Uploading the builds through the browser manually.
  • Firebase CLI: Uploading the builds through the terminal.
  • Fastlane: This option enables the user to automate the uploading.
  • Gradle: Same as Fastlane plus the advantage of having this process (uploading and distribution) integrated in the build creation process itself.

If you have not used Firebase before, you need to first install Firebase CLI in your computer, (here is a link). Once you have installed it, you need to log in Firebase CLI, open a new terminal and type the next command.

firebase login

You will also need to fill in your email and password. Congrats! You have logged in Firebase and thus, you should be able to see all your projects. Recall that our goal is to upload the apk to the project using terminal. For that, go to the apk folder and use the next magic command.

appdistribution:distribute

That’s all! By using the above command, the apk has been pushed to App Distribution 😍. I recommend adding some notes for the testers and selecting the tester group(s) that will be notified automatically after deploying the build.

appdistribution:distribute --app 1:394865336367:android:8454bf8bad1c70eb17a6da --release-notes "My first distribution" --groups "Developers, Testers" app-debug.apk

As you can see, the command above includes different params. I will describe each param one by one.

  • appdistribution:distribute: The main command.
  • add: Firebase project id located in the settings.
  • release notes: String that clarifies the purpose of the release.
  • groups: String stating the testers groups created on Firebase.
  • app-debug.apk: The apk generated by the IDE.

We are done! See below the results. 💪

What’s next?

Firebase is a platform that allows mobile app developers to manage their builds and swap between releases very easily. When a developer deploys a release and it becomes successful, Firebase will notify testers and developers by email. That email will contain instructions to start testing the app.

Wow, as you see Firebase is fairly friendly to use compared to the other platforms. Firebase also offers other advantages like integrating your app with Crashlytics and Performance to know more about the crashes on the app, showing where and when it happens. So your testes can report automatically a crash in an easy way to developers 😉. I will explain more about this in the next post!

Don’t hesitate to ask whatever if you have any doubt 🙊. If you’re looking for new opportunities, come contribute to what we’re doing at Jeff !

See you in the next post 👋

--

--