How to connect my android app to the remote web server -



How to connect my android app to the remote web server -

i working on android app. right requesting webserver , getting info successfully.

now thing when running server , mobile device on same network it's working fine. when webserver running on 1 network ex. wlan , android device network 3g enabled app not able create request.

so how can create webserver request visible different networks.

on android part making retrofit request server.

restadapter restadapter = new restadapter.builder() .setendpoint("http://134.162.1.120:3000") // ip of scheme (just random ip illustration purpose) .setloglevel(restadapter.loglevel.full) .build();

i getting info when pc , android device on same network. when phone , pc on different network it's not getting connected

the server on local pc..

sounds server in local lan can access mobile device if in same network via wlan. accessing server it's lan-ip. can't access ip outside of lan (from internet) case if using 3g on mobile device.

now can do? find out 'external' ip of server visible on net , utilize in app. aware should have static ip not case. host webservice on professional webhosting service.

android

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -