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 ''
  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 ...

Get Firebase Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.