user2819669
user2819669

Reputation: 59

Socket communication in Android is not working

I have a client application which is currently able to communicate to the server from android emulator. It does not work if I run it from my android phone. What could be the possible issue..??

Note: Its a socket communication and I am using AsyncTask for the same and ensuring that I am not running in the main thread. IP address and the port numbers are still the same.

Upvotes: 0

Views: 102

Answers (1)

Ssam
Ssam

Reputation: 277

If you use socket communication by using your mobile , you should check whether your server ip is public ip that you can access in anywhere or not. unless ip address network is different between server and client (your mobile), It would run very well~

Upvotes: 1

Related Questions