Members,

I have developed an application using which I can view mjpeg stream being
streamed from my camera, on my android phone.
It works fine if a user authentication is not required. But fails when the
server requires a user authentication.
Following code is used to read the Mjpeg stream.

//url           = http://xyz.xyz.xyz.xyz:80/xyz/mjpeg.cgi
//usrid        = admin
//password = admin

public static MjpegInputStream read(String url, String usrid, String
password) {
        HttpResponse res;
        DefaultHttpClient httpclient = new DefaultHttpClient();
        try {
            res = httpclient.execute(new HttpGet(URI.create(url)));
            return new MjpegInputStream(res.getEntity().getContent());

        } catch (ClientProtocolException e) {
        } catch (IOException e) {}
        return null;
    }

Could someone please explain to me how I can include the usrid and the
password to the above code and make it work?

Thanks in advance
Rajesh

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

Reply via email to