SocketChannel, broken pipe exception - Cupcake only

by moju27 » Fri, 23 Apr 2010 11:23:34 GMT


Sponsored Links
 Hello :)

I'm currently writing an application to communicate with my server app
which is on a PC on the LAN. I'm using a SocketChannel and it causes
an IO exception (broken pipe). The weird and really problematic part
is that this exception only occurs on Cupcake !!!

To give more details, the exception happens when I'm writing on the
socket channel. The socket channel says that it's connected / bound,
everything seems to be correct. Plus I see my client on the server
side.
By the way, I use a non blocking socket.

So, I would be very happy if anyone had a clue regarding this ... I
couldn't find any help anywhere else.

Thanks,

Morgane

--



Other Threads

1. Re :SMS Database with new Hero ROM

Subject:
Re: [android-developers] Re: SMS Database with new Hero ROMFrom:
Markus Etter <met...@talionis.net>Date:
Thu, 24 Sep 2009 20:33:58 +0200To:
android-developers@googlegroups.com




I've developed an sms application. With the new Hero rom, the app
doesen't work anymore. It seems as if the database has changed.

I use the following approach to get the data I need:

private String[] mProjection = new String[]
{"thread_id","address","body","read","date","m_type","type"};
private Uri mUri = Uri.parse("content://mms-sms/conversations");

Cursor smsCursor= context.getContentResolver().query
(mUri,mProjection,null, null,"DATE DESC");

This code now suddenly crashes on HTC Hero phones, complaining about
missing tables (thread_id for instance).

How can I fix this? Where do I get additional information about "new"
db design? And more generally: How in gods name am I supposed to
handle different behaviour on different phones when I develop my apps
on the standard SDK???



Do you have any evidence that the SMS database is part of Android's public
API?

If it is not -- and it does not seem to appear in android.provider, where
the officially-supported providers reside -- then you will run into
problems like this. Any device manufacturer is welcome to replace the
built-in applications, including SMS.

Solving this may not be possible, unless you can do queries with wildcards
on the content provider (never tried that) and can therefore inspect at
least the column names that way. Even then, that implies that you can
learn the schemas for all devices that change the original schema and can
adapt your application to each.

This is not significantly different than building an application that
assumes the existence of Outlook that then crashes when the user only has
Outlook Express, Mozilla Thunderbird, or some other email client.

If there isn't an issue already, you might consider putting an issue in
http://b.android.com, asking for a common SMS store to become part of the
official API (again, assuming it is not official already).



Hello Mark

Thank you for your quick and enlightening reply. It wasn't clear to me that
something I can access using the standard SDK might actually not be part of
the public API. If it actually is not it would completely prevent the
development of alot of SMS applications.
There actually IS an open issue for this located here:
http://code.google.com/p/android/issues/detail?id=914&q=sms&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

However there still are SMS apps that do not seem to be influenced by this
problem; ergo I assume there's some dirty way around?


Cheers, Markus

--~--~---------~--~----~------------~-------~--~----~

2. SMS Database with new Hero ROM

Hello

I've developed an sms application. With the new Hero rom, the app
doesen't work anymore. It seems as if the database has changed.

I use the following approach to get the data I need:

private String[] mProjection = new String[]
{"thread_id","address","body","read","date","m_type","type"};
private Uri mUri = Uri.parse("content://mms-sms/conversations");

Cursor smsCursor= context.getContentResolver().query
(mUri,mProjection,null, null,"DATE DESC");

This code now suddenly crashes on HTC Hero phones, complaining about
missing tables (thread_id for instance).


How can I fix this? Where do I get additional information about "new"
db design? And more generally: How in gods name am I supposed to
handle different behaviour on different phones when I develop my apps
on the standard SDK???

--~--~---------~--~----~------------~-------~--~----~

3. name of the event which gets trigger when i push/pull the file in FS

4. Picasa intent return code

5. RDP on Android

6. An idea for the Goggle Team to ease migration from device to device - and other stuff :)

7. Ideas for improvements - where to send?