开发者

Using a WebView widget to authorize access

开发者 https://www.devze.com 2022-12-30 02:57 出处:网络
I am trying to access a server that requires authorization using the WebView widget in Android. I think it\'s the .htaccess type of authorization.

I am trying to access a server that requires authorization using the WebView widget in Android. I think it's the .htaccess type of authorization.

I works with the default browser provided with the OS, but when I try it with a WebView.. it gives a 401 immediately.

Any ideas on how I can have a WebView p开发者_StackOverflowresent the dialog to enter the user/pass (and remember it)?

Thanks.


Try using a WebViewClient, overriding its onReceivedHttpAuthRequest() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消