1

On an iPhone project I'm using AsyncUdpSocket and AsyncSocket which I've found here.

Do you know if there is something similar for Android?

I've tried to search on google for a java verion of these classes but I haven't found any. By the way I've searched this "AsyncUdpSocket.java".

I've also found something about NIO libraries but I don't know if I can use it on Android.

VansFannel
  • 45,055
  • 107
  • 359
  • 626

1 Answers1

0

I am not that familiar with Java, but since AsyncSocket is just a higher-level verison of Apple's socket API, all you need to do is create a socket in Java and receive the data. There is no "trick" the data will not be in "objective-c" so it's pretty easy to process (I created a Objc-> Python and that data was the same). Heres oracle on creating java sockets: http://docs.oracle.com/javase/tutorial/networking/sockets/index.html

Milk Tea
  • 141
  • 5
  • Thanks. This is true but I'm trying to find something made and functional. I don't want to re-invent the wheel. – VansFannel Jun 06 '12 at 14:28
  • Oh so you want a higher level socket API, try Netty? https://community.jboss.org/wiki/Netty?_sscc=t – Milk Tea Jun 06 '12 at 14:31
  • Thanks. I've find it here: http://netty.io/ but I wasn't sure it will run on Android. – VansFannel Jun 06 '12 at 14:33
  • Since Android is an open platform, I am not sure why it wouldn't... I found this if this helps you more on its use on Android Platforms: http://lists.jboss.org/pipermail/netty-users/2009-January/000221.html – Milk Tea Jun 06 '12 at 14:35
  • Ok. I'll try it and I'll tell you. – VansFannel Jun 06 '12 at 14:39
  • I am late to the party on this one but thought I would share incase others have the question. AsyncSocket is great. In Java I always use Netty which is a really good Java socket library. Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server. See: http://netty.io/ – Yepher Oct 03 '14 at 14:04