views:

62

answers:

1

Is there a decent mechanism for doing asynchronous I/O using sockets on Android?

I'm aware of the existence of nio channels, but they don't work for me because I need to be able to use MulticastSockets and BluetoothSockets, neither of which support channels.

I'm aware the answer is probably that there isn't one, but as this is a fairly big piece of work I thought I'd ask first to be sure. And if anyone knows of a decent third-party library I might be able to use...

+1  A: 

Other than nio I don't know any built-in option for this problem however there is an interesting answered question on this already on SO.

Take a look at it maybe the third party libraries will help you. http://stackoverflow.com/questions/592303/asynchronous-io-in-java

I can't tell how well those libraries work on Android you might also have to get them Android-ready in order to work correctly.

Octavian Damiean
Thanks --- unfortunately none of those really did what I wanted so I'm rolling my own. What use is a wheel if you can't reinvent it? Sigh. I'll see if I can persuade my boss to let me release the library as open source once I'm done.
David Given
+1 for trying to open source your library!
Octavian Damiean