I want to know why this code doesn't work on my hero. In emulator it
works fine, but when i try the program on the phone it fails.

HttpClient client = new DefaultHttpClient();
((AbstractHttpClient) client).getCredentialsProvider().setCredentials
(new AuthScope(null, -1),new UsernamePasswordCredentials("user",
"password"));
HttpGet request = new HttpGet("http://192.168.0.103/snapshot.jpg";);
HttpResponse resp = client.execute(request);

if i want to get a request from a non-passworded http, it works very
good on the pjone as well as emulator. i need a solution to this
problem, maybe another way to log in. i don't believe it is because i
don't have my hero rooted, but anything is possible. i will appreciate
any help.

--~--~---------~--~----~------------~-------~--~----~
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