Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualCanvas

Posted 16 March 2013 - 09:35 PM

Hello there guys,

 

I've been asking around on many forums asking for some help on an application I am trying to create, Let me first explain the functionally of the application I want to develop

 

Application :

    This application will simply start a server and allow other android devices to connect to the device and play this application together, how I want this to work is, one user will use WiFi, I do apologize the title should not have WiFi hot spot, I just want to use WiFi to send data from one device to another.

Problems :

    I have created a TCP/IP and a Multicast server with java, now looking at Android, Android of course runs java applications, but I don't know as I can't find information about it, if the same code to start a Multicast server will work on a mobile device. All I'm trying to do is, one user will set up a server socket to listen on where clients will connect, once they are connected a thread will be created, and constant data will be send back to the client, this was achieved quite quickly and simple using Java, but with Android I'm not sure if I can do the same code for pc to Android?

 

Here is the code I have so far, but I don't think this does much

wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);

 

I have looked at this http://marakana.com/forums/android/examples/40.html , it gives an example application, but it just sends data to itself, I want to know how I can setup a sock on a mobile device, which can be used to send and receive data via UDP protocol.

 

Any help would be great, I have had no help from anyone so far, and trying to find the right code example is like trying to find a pin in a haystack.

 

Canvas


#1Canvas

Posted 16 March 2013 - 09:12 PM

Hello there guys,

 

I've been asking around on many forums asking for some help on an application I am trying to create, Let me first explain the functionally of the application I want to develop

 

Application :

    This application will simply start a server and allow other android devices to connect to the device and play this application together, how I want this to work is, one user will enable the WiFI Hot Spot, this user will run the start on their device, each other user will connect to that hot spot location and use the connection to connect to the host.

 

Problems :

    I have created a TCP/IP and a Multicast server with java, now looking at Android, Android of course runs java applications, but I don't know as I can't find information about it, if the same code to start a Multicast server will work on a mobile device. All I'm trying to do is, one user will set up a server socket to listen on where clients will connect, once they are connected a thread will be created, and constant data will be send back to the client, this was achieved quite quickly and simple using Java, but with Android I'm not sure if I can do the same code for pc to Android?

 

Here is the code I have so far, but I don't think this does much

wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);

 

I have looked at this http://marakana.com/forums/android/examples/40.html , it gives an example application, but it just sends data to itself, I want to know how I can setup a sock on a mobile device, which can be used to send and receive data via UDP protocol.

 

Any help would be great, I have had no help from anyone so far, and trying to find the right code example is like trying to find a pin in a haystack.

 

Canvas


PARTNERS