开发者

How to retrieve the GPS location via SMS

开发者 https://www.devze.com 2023-01-28 21:42 出处:网络
I made an Application that gives me the location of my Android phone. Now I want to make开发者_运维问答 a method that helps me to retrieve the GPS location of my phone (latitude longitude or the addr

I made an Application that gives me the location of my Android phone.

Now I want to make开发者_运维问答 a method that helps me to retrieve the GPS location of my phone (latitude longitude or the address if possible) with an SMS.

Exemple: phone number 558899. I send an Sms with "get location" to 558899 an get a message back with the coordinates.


this may help:

"Capture" incoming SMS: http://www.codemobiles.com/forum/viewtopic.php?p=95

Send SMS: http://www.anddev.org/how_to_send_sms-t552.html

Edit: Dead link. I don't remember what exactly was in it, just like Google's cache and Internet Wayback Machine. Following link should have some info on topic:

http://lamiaamb.wordpress.com/2012/03/19/android-capture-an-incoming-sms/


Use the Geocoder class. Pass it's getFromLocation() method the longitude and latitude and the maximal number of results you want to get returned. You'll get a List of Address objects.

0

精彩评论

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

关注公众号