How to do it...

First, let us take a look at how we will implement this recipe in Android:

  1. Now, after installing our dependencies, we will need to create the UI for our calls. To do that, simply copy and paste the following special button XML code into your layout:
      <com.google.android.gms.common.SignInButton       android:id="@+id/gbtn"       android:layout_width="368dp"       android:layout_height="wrap_content"      android:layout_marginLeft="16dp"      android:layout_marginTop="30dp"      app:layout_constraintLeft_toLeftOf="parent"      app:layout_constraintTop_toTopOf="parent"      android:layout_marginRight="16dp"      app:layout_constraintRight_toRightOf="parent" />

The result will be this:

Figure 11: Google Sign-in button after the declaration
  1. After doing that, let's see the ...

Get Firebase Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.