0

I am trying to access a google page from my app that requires sign in. I use Chrome Custom Tabs to do this. Since this is an android device the user has already signed in via a gmail account, so my question is how can I make the Custom Intent to log in to that account automatically when it is launched?

If it helps, I can also implement a separate login for my app and store the user details there and can I export that data to the Chrome Custom Tabs?

Tyson
  • 747
  • 2
  • 6
  • 18

1 Answers1

1

The purpose of OAuth is to avoid storing users' credentials.

If you are looking to implement Google Sign-In, you can use Chrome Custom Tabs, but Google has a separate SDK for this purpose (Google Sign-In for Android).

If you are intent on using Chrome Custom Tabs, I highly recommend using AppAuth, which handles most of the heavy lifting for you.

Bryan
  • 14,756
  • 10
  • 70
  • 125
  • I have to show the user a web page that cannot be called via an API, so Custom Tabs or WebView or Browser are my only choices. I tried using Custom Intent but for some reason it crashes when I start a download. – Tyson Jul 31 '17 at 13:29
  • I fixed the download error. It was caused by my emulator which had no chrome installed and launched the Custom Tabs from default webview browser. – Tyson Jul 31 '17 at 13:39