开发者

Supply some basic auth credentials to a WebView?

开发者 https://www.devze.com 2022-12-25 13:12 出处:网络
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 specif开发者_JAVA技巧y basic auth credentials when calling WebView.loadData(

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 specif开发者_JAVA技巧y 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


You can call:

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

read more here

0

精彩评论

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