开发者

Is it possible for android app to communicate with apache local host running on PC ? [duplicate]

开发者 https://www.devze.com 2023-04-11 09:38 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Getting Android to talk to Apache on localhost
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Getting Android to talk to Apache on localhost

Hi i have written a application to post image to server, but currently the server public IP is not yet hosted, because of this i am not able to test my features.

But i have one question i have the server code in my local apache server which run's fine on PC, now i want my android app in device to communicate with this local host (my local website).

i have wifi router 开发者_如何学运维is it possible to communicate with this.. if so please let me know configuration details and any changes i need to do for URL in code. to point to local host.


You should use IP in local network that points to pc with exposed apache server (if you're using WAMP switch it online). You can test your URL and apache service availability through another pc that is connected to local network. Another option is to run app on emulator and use localhost address: 10.0.2.2 [127.0.0.1 for android emulators].

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号