In iPhone there is Cocoa Asynchronous socket library. Is there a similar library in Java for Android? Can it be done using Java Asynchronous sockets(NIO library) or is there a way I can make use of NDK for Android and use native libraries for asynchronous sockets?
Asked
Active
Viewed 1,662 times
2
-
see http://stackoverflow.com/questions/1014528/asynchronous-http-client-for-java – tidwall Sep 21 '10 at 00:02
1 Answers
0
Not as far as I know, but it does have the sockets capabilities you would expect from a a modern *nix, so you should be able to emulate this using either java or native code.
Probably you would create a thread to handle the sockets asynchronously which you would communicate with using messages and handlers; alternatively you could do this by creating an android service, either within your activity's process or in a separate one.

Chris Stratton
- 39,853
- 6
- 84
- 117