Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google plus integration in webview

Currently I integrated google plus in android. But it works using native google plus app. I used this to create a sample project. https://developers.google.com/+/quickstart/android

But I want to let user login using WebView and not the google plus native app. Is there a way to user do google+ integration in WebView in android ?

Thanks In advance.

like image 409
keen Avatar asked Feb 05 '14 20:02

keen


People also ask

What can I use instead of WebView?

Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.

What apps use Android WebView?

Many Android apps like Gmail, Twitter, or Reddit apps usually display content from the internet. Google has made it easy for developers to render internet content in their apps through Android System WebView.

What is a WebView implementation?

Android System WebView lets applications display browser windows in an app instead of transporting the user to another browser. Android developers use WebView when they want to display webpages in a Google app or other application.


1 Answers

Yes, you'll essentially need to grab an access token that you can use to perform authenticated actions on behalf of the user.

For a purely client-side flow, you have three options:

  • HTML button
  • Button rendered with JavaScript
  • Initiate the sign-in flow with JavaScript

For detailed web guides about these and other flows involving servers, checkout Google's web sign-in help page.

There is also a nice basic tutorial for Google+ sign-in via Android WebView by Ian Barber.

If you need to use more Google+ functionality beyond login, consider looking up the Google+ JavaScript API.

like image 79
Alan K. Avatar answered Oct 04 '22 21:10

Alan K.