Accessing Web page using Basic Auth from WebView

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Accessing Web page using Basic Auth from WebView

Postby Croccy22 » Sun Oct 11, 2009 4:13 pm

Hi all,

I have a web view in my application which I use to send commands to a web server. If I do this from my internal LAN is is fine as the webserver does not require authentication from the local network.

If I access this from 3G/GPRS however I get prompted for a username/password. I need some way of sending this username password to the webserver using the WebView.

If i access this page from the android browser, everything works fine as it prompts for username and password. The WebView however doesn't prompt at all.

I have had a look in the SDK documentation and there is a funtion setHttpAuthUsernamePassword which looks like it should do the job and looks like this is the situation that it should be used. I cannot however get it to function.

I've looked around on the net and cannot find anyone that has got this working.

Does anyone have any idea how I can pass a username/password through to a WebView?

Thanks, Matt.
Croccy22
Developer
Developer
 
Posts: 31
Joined: Wed Dec 03, 2008 3:15 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 2 guests