使用GPS提供商有没有可能快速检测新位置的方法?
Is there a possible way to detect the new location very fast using GPS provider?
最满意答案
GPS通常很慢 - 就是这样。 但是,为了加速用户的体验,您可以执行以下几项操作:
在应用程序启动后立即开始寻找位置 - 不要等到他们到达需要位置的活动时
使用网络供应商,通常要快得多
使用被动提供者。 即接收设备上其他应用程序获取的位置更新
使用“最后一个已知”位置 - 这会存储一段时间,如果存在,则会立即为您提供位置信息(虽然它可能有点旧)
如果适合您的应用程序的上下文,请将自己的位置存储在首选项中
Google Reto Meier的这篇文章是一个很好的开始 - 查看示例代码和更多详细信息的相关链接http://blog.radioactiveyak.com/2011/06/how-to-build-location-based-apps- that.html
GPS is often slow - that's just the way it is. But there are several things you can do in order to speed up the experience for the user:
Start looking for a location as soon as the app starts - don't wait until they get to an activity that needs a location
Use the network provider, which is often much faster
Use the passive provider. i.e. receive location updates that have been acquired by other apps on the device
Use the Last Known location - this is stored for a while, and if it exists, gives you a location instantly (though it may be a little old)
If suitable in your app's context, store a location yourself in prefs
This article by Google's Reto Meier is a great place to start - look at the related links for sample code and more detail http://blog.radioactiveyak.com/2011/06/how-to-build-location-based-apps-that.html
GPS提供商及其性能(GPS provider and its performance)使用GPS提供商有没有可能快速检测新位置的方法?
Is there a possible way to detect the new location very fast using GPS provider?
最满意答案
GPS通常很慢 - 就是这样。 但是,为了加速用户的体验,您可以执行以下几项操作:
在应用程序启动后立即开始寻找位置 - 不要等到他们到达需要位置的活动时
使用网络供应商,通常要快得多
使用被动提供者。 即接收设备上其他应用程序获取的位置更新
使用“最后一个已知”位置 - 这会存储一段时间,如果存在,则会立即为您提供位置信息(虽然它可能有点旧)
如果适合您的应用程序的上下文,请将自己的位置存储在首选项中
Google Reto Meier的这篇文章是一个很好的开始 - 查看示例代码和更多详细信息的相关链接http://blog.radioactiveyak.com/2011/06/how-to-build-location-based-apps- that.html
GPS is often slow - that's just the way it is. But there are several things you can do in order to speed up the experience for the user:
Start looking for a location as soon as the app starts - don't wait until they get to an activity that needs a location
Use the network provider, which is often much faster
Use the passive provider. i.e. receive location updates that have been acquired by other apps on the device
Use the Last Known location - this is stored for a while, and if it exists, gives you a location instantly (though it may be a little old)
If suitable in your app's context, store a location yourself in prefs
This article by Google's Reto Meier is a great place to start - look at the related links for sample code and more detail http://blog.radioactiveyak.com/2011/06/how-to-build-location-based-apps-that.html
发布评论