Connect to a mobile phone
I know how to make a TCP connection from a phone to a URL (server) I know how to make an HTTP connection from a phone to a URL (server) I do not know how to make a connection from a server to a phone
Is there a way to use the phone number of a phone to bridge from voice network to data network of the same provider (VERIZON or AT&T or ROGERS in 开发者_Go百科Canada)?
In essence I wish to find a way to make a "phone call" from a server, over the Internet and over the local data network or WiFi, to a phone, without using any intermediaries
We are willing to pay for this info (optionally)
You can use Push Notification Systems for connecting to the phone. Ideally, you'd want to initiate a pull of data from the device when it receives a push notification from your server. This is because push notifications can handle only small amounts of data.
Another option for you, would be to open a socket on the client device and broadcast this address to your server during startup. Later, your server can directly connect to the listening port on your device, provided the app is still running.
You could send a push message to the phone and let the phone establish the connection.
Just a rough short sketch, maybe this will help you. If I'd had to solve that problem i would use androids Cloud2Device messaging to tell the phone to connect to a certain server which you specify in the message from the cloud. Then the phone connects to your command server and you can tell over the connection what the phone should do. This way you dont have to execute a server on the phone.
Look here
My Ideas 1.Have a look at http://developer.android.com/reference/android/net/sip/package-summary.html 2.Use C2DM(cloud to device message),It will send the message to your app 3.Use XMPP chat client from the server you can send the message to android app after receiving message your app can call(it depends on your logic)
There is no universal one-to-one mapping between cellular phone numbers and IP addresses (e.g. the user could have driven out of cell tower range to a coffee shop with wifi). So this is impossible to do directly.
The services that do seem to do this require a running app on the mobile device to cooperate by periodically connecting to some centralized database using its current IP address, which some server can record in its database for you to do a lookup when want to try to connect to that mobile device. Google "SIP service providers".
精彩评论