How to get access token after user is signed in from Gmail in Android?
For your requirements, you can use the following code: Firstly, make sure you have a valid Web OAuth 2.0 Client ID: <!– Server Client ID. This should be a valid Web OAuth 2.0 Client ID obtained from https://console.developers.google.com/ –> <string name=”server_client_id”>…e4p8.apps.googleusercontent.com</string> Then inside Activity class: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); … // … Read more