Hi,

OK, I have just filed bug report 2797: 
http://code.google.com/p/android/issues/detail?id=2797

However, I have customers that would like a fix for my application. As
I don't have a device that produces the bug, I was wondering if
someone could offer up a better implementation, or if they have run
into the same problem before, a work-a-round.

As stated in my bug report, the code sets up a connection, a Scanner
for that connection, and essentially reads in lines:

final HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, "UTF-8");

final SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("http", PlainSocketFactory
                                        .getSocketFactory(), 80));

final ThreadSafeClientConnManager manager = new
ThreadSafeClientConnManager(params, registry);

DefaultHttpClient mClient = new DefaultHttpClient(manager, params);

HttpGet get = new HttpGet(someURL);

final HttpResponse response = mClient.execute(get);
HttpEntity entity = response.getEntity();

Scanner bis = new Scanner(entity.getContent());
String imageName = "";

while (bis.hasNext()) {

String lineOfHTML = bis.nextLine();
Log.v("Debug", lineOfHTML );

}


This works in the emulator, my device, and endless other devices.
However, for certain phones, the nextLine produces nonsensical output.

Thanks in advance for any help,
Daz.

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