Matt
Matt

Reputation: 83

Android webview and google acount?

Hey everyone, I'm working an app that includes a webbrowser inside. I've done quite some progress with getting the webview widget to work as necessary, but this thing really puzzles me.

I can't get the webview to forget my google account, even with deleting cache and history, it still remembers it. Which is really annoying since the application will be used by many users on a single device.

Any help very much appreciated

Upvotes: 2

Views: 1317

Answers (2)

Mike
Mike

Reputation: 2442

You need to clear cookies too. Use CookieManager to remove all cookies. For example, you can add this to your onDestroy():

    CookieManager.getInstance().removeAllCookie();

Upvotes: 1

tplaner
tplaner

Reputation: 8461

On top of clearing the cache and history locally, you could just loadUrl for:

https://www.google.com/accounts/Logout

This should make sure the session is ended on Google's end.

Seems like a logical solution to me.

Upvotes: 1

Related Questions