Book Image

Mastering Firebase for Android Development

By : Ashok Kumar S
Book Image

Mastering Firebase for Android Development

By: Ashok Kumar S

Overview of this book

Firebase offers a wide spectrum of tools and services to help you develop high-quality apps in a short period of time. It also allows you to build web and mobile apps quickly without managing the infrastructure.Mastering Firebase for Android Development takes you through the complete toolchain of Firebase,including the latest tools announced in Google IO 2018 such as Firebase ML-Kit, FireStore, and Firebase Predictions. The book begins by teaching you to configure your development environment with Firebase and set up a different structure for a Firebase real-time database. As you make your way through the chapters, you’ll establish the authentication feature in Android and explore email and phone authentication for managing the on-boarding of users. You’ll be taken through topics on Firebase crash reporting, Firebase functions, Firebase Cloud, Firebase Hosting, and Cloud Messaging for push notifications and explore other key areas in depth. In the concluding chapters, you will learn to use Firebase Test Lab to test your application before using Firebase Performance Monitoring to trace performance setbacks. By the end of the book, you will be well equipped with the Firebase ecosystem, which will help you find solutions to your common application development challenges.
Table of Contents (23 chapters)
Title Page
Copyright and Credits
Packt Upsell
Application Usage Measuring and Notification, Firebase Analytics, and Cloud Messaging
Bringing Everyone on the Same Page, Firebase Invites, and Firebase App Indexing
Making a Monetary Impact and Firebase AdMob and AdWords
Flexible NoSQL and Cloud Firestore
Analytics Data, Clairvoyant, Firebase Predictions

Uploading and downloading files

Uploading or downloading files from cloud service was aslightly troublesome, because for uploading, there exist multipart and content type upload and other different techniques, but for downloading, we need to get the file object to read the byte stream, and we can create the local replica. Firebase makes the whole process easy and efficient. Developers can upload and download files instantly. By default, Firebase Cloud Storage requires authentication to upload files, but we can change the security rules for storage to allow public access. There is also a disadvantage in changing the security parameters to public, because the default Google App Engine app and Firebase share this bucket. Public access can make newly uploaded App Engine files publicly accessible as well. Developers need to make sure to restrict access to the storage bucket again when using authentication. Now, let's see how the Firebase storage support library helps in uploading files.