tags:

views:

345

answers:

3

The title is the question....

A: 

Due to restrictions imposed by Network Operators, it will be impossible to have mobile phones talk directly to each other. So, you will need to implement an HTTP service that will act as the middle man.

The idea is that mobile phones will connect to the service and register. They will then use the service to discover other connecting phones. The service will finally proxy the conversation between two connected devices. A suitable software layer could make the whole process transparent.

kgiannakakis
There are J2ME applications that supports peer to peer gaming without using additional servers.
Szere Dyeri
This is possible only with a Wi-Fi connection, not with 3G or GPRS.
kgiannakakis
+1  A: 

You can open a ServerSocketConnection and a SocketConnection on the other side. This allow two way direct communication between two mobile phones. You can look at this page for some more details.

Possibly you can send the initial connection information by SMS and after that switch to socket communication.

Szere Dyeri
Actually I am looking for a solution for multiple phones, and I'm not worried about the cellular network because the phones are connected through WLAN.
Kevin Boyd
Then you need a find a way to find peers. It is difficult with multiple phones and no central server. Perhaps you really need a central server.
Szere Dyeri
What if I aleardy know the IP and MAC of the peers is it possible then?
Kevin Boyd
Yes it is possible. You just need the IP addresses. You also need port number but you can fix it anyway. Depending on what you want you can one one phone act as a server and others connect to it or have multiple servers. Most phones will have security restrictions on using sockets. But you can always sign your application to overcome that.
Szere Dyeri
A: 

@Szere, very cool. Do you know of any successful companies or J2ME applications (peer-to-peer gaming, IM or streaming) that are using this technique of opening a ServerSocketConnection and then embedding the IP address into an SMS to send to another phone to connect? Thks

Dan