Android : JGroups for Android Wifi

on Saturday, July 5, 2014


If let say two android devices are not connected to any networks. No LAN, no bluetooth, no phonecall. They just turning on their WIFI. Is it possible to make them communicate each other through JGroup API? how, and what are the possibilities?


I found these JGroup code is very simple. But the Wifi connection is not discussed yet.



JChannel channel=new JChannel("/home/bela/udp.xml");
channel.setReceiver(new ReceiverAdapter() {
public void receive(Message msg) {
System.out.println("received msg from " + msg.getSrc() + ": " + msg.getObject());
}
});
channel.connect("MyCluster");
channel.send(new Message(null, "hello world"));
channel.close();

0 comments:

Post a Comment