的WebView基本身份验证的帮助 [英] WebView Basic Authentication help
问题描述
我已经创建了一个加载web视图的应用程序。为了登录, 该网站需要基本身份验证。当我尝试访问的网站 通过默认浏览器,我得到一个弹出框提示我输入我的用户名 和密码。
I've created an application which loads a WebView. In order to login, the website requires basic authentication. When i try to access the website via the default browser, I get a pop up box prompting me to enter my user name and password.
如果我试着通过应用程序来访问网站,我收到错误401,没有弹出。 我想知道,如果有人可以帮助我吗?
If I try to access the website via my application, I get error 401 and no pop up. I was wondering if someone could help me out?
谢谢 -Kyle
推荐答案
我想一个更好的解决方案比一个帕特里克介绍会使用 onReceivedHttpAuthRequest
方法说明这里:<一href="http://www.mail-archive.com/android-developers@googlegroups.com/msg30468.html">http://www.mail-archive.com/android-developers@googlegroups.com/msg30468.html
I reckon a more elegant solution than the one Patrick describes would be to use the onReceivedHttpAuthRequest
method as described here: http://www.mail-archive.com/android-developers@googlegroups.com/msg30468.html
这篇关于的WebView基本身份验证的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!