0

I want to connect a web service to android phone i.e. a request is to be made from web service to android phone. All i can find is article about android to web service but in it (as far as i know..may be wrong) a request is sent to server from android but i want vice versa.

1 Answers1

0

Most carriers give you an IP address inside their networks, so you can't access the devices through any standard method. If the device is online via WiFi then you may have a chance (depending on your ISP and router policies, and given the case you have a web server or a permanent socket listening for requests). Nevertheless, it's still a very bad idea.

I would recommend you to use a different approach: make your android device call a Web Service that recognizes it (either via IMEI, IMSI, both, or a user parameter, depending on your app) and see if it has some "news" for him. If it does, then it should take an action depending on the received data. If you're familiar to Java, it's roughly like the MDB (EJB) idea.

Vicente Plata
  • 3,320
  • 1
  • 17
  • 26