How to integrate google sign-in in android app

Prerequisites Google Sign-In for Android has the following requirements: A compatible Android device that runs Android 2.3 or newer and includes the Google Play Store or an emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or newer and has Google Play Services version 9.0.2 or newer. The latest version […]

How to create a new google project in google developer console

1. Go to the Google developer consoleĀ and click on create a project. 2. Enter the project name and click on Create 3. Now, we will add the Google+ API into our new project. Go to the overview page and click on Google+ API present under Social APIs. Then, click on the Enable button. 4. The […]

Code for adding google sign in

1. Create a new project in android studio and name it as “GoogleSignIn”. Then, create an activity SignInActivity and its layout “activity_signin. activity_signin.xml <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”” xmlns:tools=”” android:layout_width=”match_parent” android:layout_height=”match_parent” android:paddingBottom=”@dimen/activity_vertical_margin” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin” tools:context=”google.googlesignin.SignInActivity”> <TextView android:id=”@+id/tv_username” android:layout_marginTop=”50dp” android:layout_centerHorizontal=”true” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> <TextView android:id=”@+id/tv_Email” android:layout_marginTop=”100dp” android:layout_centerHorizontal=”true” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> < android:layout_centerInParent=”true” android:id=”@+id/sign_in_button” android:layout_width=”120dp” android:layout_height=”wrap_content” […]