user246114
user246114

Reputation: 51601

Supply some basic auth credentials to a WebView?

I have a WebView. I'd like to show some page from my server, but I require some basic authentication. Is there a way I can specify basic auth credentials when calling WebView.loadData() somehow? I can do this on iphone with the equivalent webview class, thinking maybe same is possible with android?

Thanks

Upvotes: 1

Views: 9936

Answers (1)

Pentium10
Pentium10

Reputation: 207863

You can call:

 setHttpAuthUsernamePassword (String host, String realm, String username, String password)

read more here

Upvotes: 5

Related Questions