views:

42

answers:

3

So i am making a android app, and i want it to be so if i call lets say 911 it sends my GPS coordinents to a certain IP, i know everything but how i make it so if i call 911 it sends the info and how i can make it send the info to the IP via 3g, can anyone help?

A: 

With regards to detecting the call being made, check out this SO post. I imagine the number being dialed will be part of the intent that was broadcast.

From there, you will need to fire up the GPS and grab the coordinates which is easy to do and you can follow this SO post. The problem will be it may take some time to grab the coordinates, but that's another issue.

AFAIK, there's no wait to force it to send data over 3G vs Wi-Fi but based on what you say you want to do, I don't think it'll matter (if it does matter, update your post and I'll try to address it). Just use the standard HTTP or Socket classes you would use normally to make a connection to the server you need to send the data to.

If you want to upload information, the place you're uploading has to be prepared to accept your connection. I can't tell you how to upload it unless I know more about your server and how it's set up. For starters, check out the socket class and the HTTP client classes.

Chris Thompson
Thnx but can you tell me how i can send the info? So basicly how i can make it send my GPS coordinents to an IP, and into an Android Emulator
Haraldur
What do you mean "into an Android Emulator?" Do you have an emulator running on some remote server??
Chris Thompson
@Haraldur, how is the computer at the specified IP set up? Is it a web server or just a program listening on a specific port?
Chris Thompson
A: 

Can you tell me how i can send the info? So basicly how i can make it send my GPS coordinents to an IP, and into an Android Emulator?

Haraldur
A: 

I mean like when you upload to youtube. Upload to a specific Ip

Haraldur