How to add Google sign-in to your app

A Google sign-in allows your users to sign in to your application using their Google credentials. This recipe will walk you through the process of adding a Google sign-in to your application. Here's a screenshot showing the Google sign-in button in the application that we'll create in the recipe:

How to add Google sign-in to your app

Getting ready

Create a new project in Android Studio and call it GoogleSignIn. Use the default Phone & Tablet option and select Empty Activity when prompted for Activity Type.

The Google sign-in uses the Google Services plugin, which requires a Google Services Configuration file, which is available from the Google Developer ...

Get Android Application Development Cookbook - Second Edition 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.