Chapters

Hide chapters

Saving Data on Android

Second Edition · Android 11 · Kotlin 1.5 · Android Studio 4.2

Using Firebase

Section 3: 11 chapters
Show chapters Hide chapters

12. Firebase Overview
Written by Fuad Kamal

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Creating a successful mobile app isn’t easy. Not only do developers need to focus on writing code and fixing bugs, they often need to manage a variety of tools and build complex infrastructures too. Factor in tight schedules and resource constraints, and you’ve got your work cut out!

Thankfully, though, Google understood the need for a simpler way to create high-quality apps, and in 2014 they acquired Firebase. More recently, Google announced that in October 2019, they will start to sunset their existing Google Analytics for mobile apps and is directing its users to use Firebase instead. With Firebase, developers got all of the existing functionality of Google Analytics, plus a lot more.

Note: The Google Analytics referred to hereafter in this book is a new sub-feature of Firebase and not the legacy platform.

Firebase history

Initially, Firebase was a mobile backend service that let you build mobile apps without having to worry about managing your own backend. However, not too long after its release, developers wanted more, so Firebase expanded its initial feature set to include more features. With these new features, you can develop apps faster, increase your user base, make more money and ensure the delivery of high-quality apps. On top of all that, there’s an analytics product that ties it all together.

Note: Most modern mobile apps require a data access layer for things that can’t be done solely on a device, like sharing and processing data from multiple users or storing large files. The remote server, typically known as the backend, is responsible for handling these backend services.

Why Firebase?

Firebase is known for its easy-to-use APIs, great documentation and fantastic developer support. In addition to that, it only takes a few minutes to integrate Firebase with your projects.

Getting started

Firebase Console

Firebase Console is where you set up and manage your apps. From there, you can view all of your projects as well as create new ones.

Firebase Console Main Screen.
Caxuqade Zukluxi Yaef Msriuk.

Disable Google Analytics Switch.
Pomewha Kaotva Ehakjlawr Bfeybz.

Project Homepage.
Bbujaxd Guyuqiha.

The Firebase Options Menu.
Lgi Komutafi Avduihj Mamo.

Authentication Page.
Iodnupyakocuob Copi.

The list of sign-in providers.
Bsu tovr uy pirq-al txuxuwoyd.

Firebase analytics

To build a successful app, you need to clearly understand how your users behave and how they use your app. This is why analytics are so important.

Developing

Firebase offers many products that help you develop your app. Products that you’ll use in this section of the book are Authentication, Realtime Database, Cloud Firestore and Cloud Storage. Now, you’ll learn the basics of each one.

Authentication

Most apps need a way to identify a user so they can customize their experience and keep user data secure, while making authentication easy for both end-users and developers.

Realtime Database

Many apps need a way to store and share data from the server. When building your own backend, there are a few things that you need to manage, such as setting up and maintaining the database, real-time data synchronization and offline support. This can be tedious and time-consuming.

Cloud Firestore

Cloud Firestore, like Realtime Database, is also used for saving the data to the cloud. It comes with the same feature set as Realtime Database, letting you store data in the cloud and sync data among different devices or share it with other users.

Cloud Storage

When it comes to storing and sharing pictures and similar files, Cloud Storage is crucial. Cloud Storage lets you upload user files to the cloud so they can be shared with others. If you want to share those files with specific users, you can leverage Firebase Authentication for that.

Other products

Firebase also offers other products for developing your app that aren’t covered in this book. These include ML Kit, Cloud Functions and Hosting. You can learn more about them by reading the official Firebase page at https://firebase.google.com/products/.

Improving app quality

Firebase can help you improve the quality of your apps.

Growing a business

Firebase has several products that you can use to methodically grow your app, gain more users and help you earn more money.

Key points

  • Firebase is Google’s mobile platform that helps you quickly develop high-quality apps and grow your business.
  • Firebase consists of three main pillars: Develop, Improve and Grow.
  • Firebase Console is a single place where you need to go to set up and manage your app.

Where to go from here?

There’s a lot more to explore in Firebase. You can find out more about different Firebase products and their key features in the official Firebase documentation: https://firebase.google.com/docs.

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.

You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now