如何通过使用网络位置提供商大地定位的Andr​​oid设备提供商、大地、位置、设备

2023-09-06 18:24:56 作者:无心话伤了有心人

我想开发可用于查找谁也安装了应用程序的朋友的位置,一个Android应用程序。该应用程序会发现位置不使用GPS而是通过的 Android的网络位置提供商

I am trying to develop an Android application that can be used to find location of a friend who has also installed the application. The application will find location not using GPS but through Android Network location provider.

谁想要得到朋友的位置将一个特定的短信发送给朋友的人,朋友的电话然后将处理在后台短信,使用网络位置提供商找到位置,并使用含短信回复请求者位置。

The person who want to get the location of a friend will send a particular SMS to the friend, the friend phone will then process the SMS in background, find the location using network location provider and reply the requester with a SMS containing the location.

所以,我需要帮助方面(1):如何找到使用网络位置提供者的位置,(2):如何实现,可以读取在后台收到的消息,并激活应用程序做一些作业的服务。答案任何上述两个查询的是高度AP preciated。谢谢你。

So, I need help regarding (1): how to find location using Network Location Provider, and (2): how to implement the service that can read the incoming message in background and activate the application to do some job. Answers to any of the above two queries is highly appreciated. Thanks.

推荐答案

雷托梅耶尔已经推出了很多关于做位置正道良好的信息。一个很好的出发点是在这里:的http:// android- developers.blogspot.com/2011/06/deep-dive-into-location.html

Reto Meier has put out a lot of good information regarding the right way to do location. A good starting point is here: http://android-developers.blogspot.com/2011/06/deep-dive-into-location.html

有关短信片,你将需要设置一个广播接收器。下面是一个例子,让你开始:的http://androidsource$c$c.blogspot.com/2010/10/receiving-sms-using-broadcastreceiver.html

For the SMS piece, you are going to need to setup a BroadcastReceiver. Here is an example to get you started: http://androidsourcecode.blogspot.com/2010/10/receiving-sms-using-broadcastreceiver.html