草庐IT

LocationManager

全部标签

android - 在 Android 中同时使用 GPS 和 Network Provider

我在我的应用中实现了一个位置监听器,它使用了网络提供者。这一切都很好,因为我想要一个快速的位置,并且使用GPS提供程序需要很长时间。但我的应用程序中的位置必须准确(最大5-10米)。我想知道是否可以同时使用GPS提供商和网络提供商,然后获得两者的最佳结果?是否也可以让我知道GPS提供商何时向我提供了GPS位置?所以基本上:LocationManagerlm=(LocationManager)getSystemService(Context.LOCATION_SERVICE);lm.requestLocationUpdates(LocationManager.NETWORK_PROVID

android - 在 Android 中同时使用 GPS 和 Network Provider

我在我的应用中实现了一个位置监听器,它使用了网络提供者。这一切都很好,因为我想要一个快速的位置,并且使用GPS提供程序需要很长时间。但我的应用程序中的位置必须准确(最大5-10米)。我想知道是否可以同时使用GPS提供商和网络提供商,然后获得两者的最佳结果?是否也可以让我知道GPS提供商何时向我提供了GPS位置?所以基本上:LocationManagerlm=(LocationManager)getSystemService(Context.LOCATION_SERVICE);lm.requestLocationUpdates(LocationManager.NETWORK_PROVID

android - 在没有谷歌播放服务的情况下获取位置-android

我知道有些手机没有预装谷歌播放服务。我想问是否有可能在没有GooglePlayServices的情况下获取位置,只需使用LocationManager。不是LocationClient。 最佳答案 你可以使用LocationManagerLocationManagerlocationManager=(LocationManager)getApplicationContext().getSystemService(LOCATION_SERVICE);Locationlocation=locationManager.getLastKno

android - 在没有谷歌播放服务的情况下获取位置-android

我知道有些手机没有预装谷歌播放服务。我想问是否有可能在没有GooglePlayServices的情况下获取位置,只需使用LocationManager。不是LocationClient。 最佳答案 你可以使用LocationManagerLocationManagerlocationManager=(LocationManager)getApplicationContext().getSystemService(LOCATION_SERVICE);Locationlocation=locationManager.getLastKno

android - map.setMyLocationEnabled(true) 的真正作用是什么

我正在设置:map.setMyLocationEnabled(true)但我想知道这到底是做什么的。我所知道的:我在map右上角有一个“定位我”按钮我在map上看到代表我当前位置的蓝色图标这是我的担忧。我正在编写一个位置感知应用程序,但我担心电池。在我的应用程序的其他地方(通过首选项),我设置了一个LocationManager并监听位置事件,以便我可以记录它们。但我的部分偏好是我获得更新的准确性和间隔。当我关闭LocationManager时:locationManange.removeUpdates(LocationListenerlistener);我希望关闭整个应用的定位服务。

android - map.setMyLocationEnabled(true) 的真正作用是什么

我正在设置:map.setMyLocationEnabled(true)但我想知道这到底是做什么的。我所知道的:我在map右上角有一个“定位我”按钮我在map上看到代表我当前位置的蓝色图标这是我的担忧。我正在编写一个位置感知应用程序,但我担心电池。在我的应用程序的其他地方(通过首选项),我设置了一个LocationManager并监听位置事件,以便我可以记录它们。但我的部分偏好是我获得更新的准确性和间隔。当我关闭LocationManager时:locationManange.removeUpdates(LocationListenerlistener);我希望关闭整个应用的定位服务。

android - LocationClient 与 LocationManager

LocationClient和LocationManager有什么区别。它们之间的优缺点是什么(比如电池、精度)?哪个更好用? 最佳答案 LocationManager是在AndroidSDK中引入的,可以作为android的一个特性来使用。LocationClient是GooglePlaySDK的一部分,并在最近的GoogleIO2013中引入。可以理解,由于LocationClient是最新的,因此可以更有效地以最少的能量(电池消耗)和更高的准确度获取位置。更新:LocationClient已弃用。您必须使用GoogleApiC

android - LocationClient 与 LocationManager

LocationClient和LocationManager有什么区别。它们之间的优缺点是什么(比如电池、精度)?哪个更好用? 最佳答案 LocationManager是在AndroidSDK中引入的,可以作为android的一个特性来使用。LocationClient是GooglePlaySDK的一部分,并在最近的GoogleIO2013中引入。可以理解,由于LocationClient是最新的,因此可以更有效地以最少的能量(电池消耗)和更高的准确度获取位置。更新:LocationClient已弃用。您必须使用GoogleApiC

iphone - 从未调用过 LocationManager 的 didEnterRegion

我厌倦了发现这个问题,但无法理解为什么会发生这种情况,因为位置管理器的委托(delegate)方法didEnterRegion或didExitRegion从未被调用过。我在我的iPhone上对此进行了测试,但它不起作用。请告诉我我错过了什么。我的源代码是:-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{self.window=[[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen

ios - 需要 iBeacon locationManager :didEnterRegion to trigger at near physical contact when backgrounded

这是我的挑战。我有一个配置为iBeacon的gimbal系列20,我的目标是让我的用户将他们的手机与应用程序后台的信标保持近距离物理接触。想想苹果支付。我已将发射功率一直设置为-23,但它仍然太强,并且信标正在触发DidEnterRegion委托(delegate)方法,距离可达一英尺。使用测距,我可以通过直接测量rssi来进一步设定阈值。该解决方案在应用程序运行时运行良好。我的问题是这个解决方案在后台运行不可靠,因为它在enterRegion事件后仅运行几秒钟然后停止。有没有办法进一步抑制信标的信号强度或其他方式导致locationManger:DidEnterRegion:触发较低