Asynchronous socket I/O on Android
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 i开发者_开发问答f anyone knows of a decent third-party library I might be able to use...
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. 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.
I'm using this: https://stackoverflow.com/a/9832633/516188
but keep in mind my comment to that solution, under the solution itself.
精彩评论