I have developed application. I have used socket connection. I am able to open socket on wifi but unable to socket on 3G. I have googled but not got any luck.
Please help me.
Here is my code:
SocketAddress socketAddress = new InetSocketAddress(uri.getHost(), port);
this.socketChannel = SocketChannel.open();
this.socketChannel.configureBlocking(false);
this.socketChannel.connect(socketAddress); // Create a Selector and attach to SocketChannel
Selector selector = Selector.open(); this.socketChannel.register(selector,
this.socketChannel.validOps());
Thanks in advance.