c# - android emulator get connection to localhost visual studios -
oh ok on android emulator trying parse json , using visual studio c# web service in between. each time fire of emulator returns null, how can fix this? have uploaded json file website , works correctly can't see make work on emulator. file called tryjson.json , can on internet using http://localhost:62446/tryjson , website http://www.website.com/tryjson on emulator trying http://10.0.2.2:62446/tryjson , http://10.0.2.2/tryjson yet return null can possibly wrong? know json correct because if http://www.website.com/tryjson in emulator url comes back. issue localhost connection not know what.
the alias " http://10.0.2.2:62446/tryjson" should have worked, since documentation says localhost requests should use adress (http://developer.android.com/tools/devices/emulator.html).
but try using ip adress. if use windows, open cmd , type
ipconfig
you should see ip adress, 192.168.x.xxx.
use in url app requesting.
Comments
Post a Comment