获取纬度和经度,而不从应用程序中插入SIM卡和启动/停止GPS [英] Get Latitude and Longitude without inserting Sim Card and Start/Stop Gps from Application

查看:210
本文介绍了获取纬度和经度,而不从应用程序中插入SIM卡和启动/停止GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取GPS纬度和经度,但我有一个查询,每当我尝试获取纬度和放大器;长期不用的SIM卡,它没有提供任何信息的地方,一旦我插入我的SIM卡,它提供了我所期望的方式的所有信息。

I am trying to fetch Gps latitude and longitude, but i am having a query that whenever i try to fetch Lat & Long without sim card, it is not providing any info where as soon i insert my sim card, it provides me all information in desired manner.

LocationManager mlocManager = 
    (LocationManager) getSystemService(Context.LOCATION_SERVICE);

LocationListener mlocListener = new MyLocationListener();

mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
                                   0, 0, mlocListener);

您可以使用,虽然IM GPS_PROVIDER,它不给我纬度和放大器见;长期不用的网络运营商的帮助,任何人都可以电话我?

you can see though i m using GPS_PROVIDER, it is not giving me Lat & Long without Network Operator help, can anybody tel me?

另一件事是如何启动和停止GPS从应用程序意味着我想特定时间后启动GPS比,一旦我得到beslocation,我可以把它关掉。

Another thing is How to start and stop GPS from an application means i wanna start gps after particular time and than as soon i get beslocation, i can turn it off.

推荐答案

您不必访问任何网络,获得Android的GPS位置。但是因特网连接速度向上的位置锁定从约5分钟到5秒(大约)!这一改进带来的辅助型GPS(A-GPS),而不是独立GPS。

You don't need to have access to any network to get a GPS location on Android. But an internet connection speeds-up the location fix from about 5 minutes to 5 seconds (approximately)! This improvement is brought by Assisted-GPS (A-GPS), as opposed to standalone-GPS.

GPS手机(包括Android设备)检查网络连接是否可用。如果是这样,他们下载的辅助数据的距离和A-GPS服务器,并用它来计算的GPS芯片组的位置固定。如果没有,则GPS芯片组必须从一个GPS卫星,这需要很长的时间下载数据(速率为50的的每秒!)。 该方法也被加速,如果GPS位置已经计算不久前

GPS phones (including Android devices) check if a network connection is available. If so, they download assistance data from and A-GPS server and use it to compute the location fix with the GPS chipset. If not, the GPS chipset has to download the data from a GPS satellite, which takes a long time (rate is 50 bits per second!). The process can also be sped up if a GPS location has been computed not too long ago.

所以,第一:

  • 检查已添加ACCESS_FINE_LOCATION你清单的权限
  • 检查GPS卫星都在手机的设置中启用
  • 检查你是不是在室内(从卫星20000公里上面不喜欢的屋顶和墙壁的信号)

然后开始你的应用程序,并等待,可以有几分钟的第一个补丁可用之前。

Then start your app and wait, there can be a few minutes before the first fix is available.

至于从你的应用程序启动GPS,似乎有可能(见启用GPS编程喜欢塔斯克),但我不'知道如何!至少你可以下载塔斯克并计划到启动/停止GPS。

As for starting the GPS from your app, it seems possible (see Enable GPS programatically like Tasker), but I don't know how! At least you can download Tasker and program it to start/stop the GPS.

这篇关于获取纬度和经度,而不从应用程序中插入SIM卡和启动/停止GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆