problem is , In android app i create sockets with ip provided with cellular network it works fine but does not work when i use wifi router as internet connection then its ip is local ip which is something like this 192.168.23.2 then sockets does not work from other networks
server send notification to mobile app works fine when there is cellular data network in mobile like 3g etc but when there is wifi or mobile is connected to router then its ip is usually something like this 192.168.12.5, and now if i send notification from server to this ip , now app is not able to receive notifications , i need to get the ip of mobile to be connectable from anywhere here is how i am sending data to ip
var net = require('net');
var client = new net.Socket();
client.connect(3001, '192.168.8.101', function() {
console.log('Connected');
let data_call = {'type' : 'call' , 'user_ip' : '192.0.0.1', 'user'
: 'Pappa'}
let data_msg = {'type' : 'msg' , 'user_ip' : '192.0.0.1', 'user' :
'Pappa', 'text' : 'i am good'}
client.write(JSON.stringify(data_call));
console.log('message sent');
client.destroy();
});