On Sun, Apr 24, 2011 at 1:53 AM, Mike T <[email protected]> wrote:
> Android 2.2 API 8
>
>
> I am trying to use my app to send commands to my web camera.  The
> command works using curl.
>
> curl -u user:user http://somesite.com/decoder_control.cgi?command=28
>
> returns OK
>
> When using my app it gives me a 401 Unauthorized error.
>
> Any help would be greatly appreciated.
>
> webview.clearCache(true);
> webview.setHttpAuthUsernamePassword("http://somesite.com/
> decoder_control.cgi?command=28", "", "user", "user");
> webview.loadUrl("http://somesite.com/snapshot.cgi";);

For starters, you are loading the wrong URL.

Second, a "host" is not a URL (first parameter to
setHttpAuthUsernamePassword()).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to