O'Reilly logo

Firebase Cookbook by Houssem Yahiaoui

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

We will first see how we can implement anonymous authentication in Android:

  1. Fire up your Android Studio. Before doing anything, we need to get some dependencies first, speaking, of course, of the Firebase Auth library that can be downloaded by adding this line to the build.gradle file under the dependencies section:
       compile 'com.google.firebase:firebase-auth:11.0.2'
  1. Now simply Sync and you will be good to start adding Firebase Authentication logic. Let us see what we're going to get as a final result: 
Figure 6: Android application: anonymous login application

A simple UI with a button and a TextView, where we put our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required