Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the "save password" dialog on an Android WebView?

I'd like to know how to prevent an Android WebView form asking to save the "password-data" from a html form?

May you can help me out on this?

like image 426
aichingm Avatar asked Jul 17 '12 22:07

aichingm


People also ask

How do I turn off Long press in webView?

1) android:longClickable="false" 2) webView. setLongClickable(false); 3) webView. setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { return true; } });


1 Answers

Try this:

Get webview settings with .getSettings() and set this method setSavePassword(false)

public void setSavePassword (boolean save)

http://developer.android.com/reference/android/webkit/WebSettings.html#setSaveFormData(boolean)

For those using API Level 18, please see Kirk Hammet's answer below.

like image 133
Nikola Despotoski Avatar answered Oct 12 '22 07:10

Nikola Despotoski