【问题标题】:Getting location updates both foreground and background in android google maps在 android 谷歌地图中获取前景和背景的位置更新
【发布时间】:2015-01-07 06:30:46
【问题描述】:

我正在开发一个 android 应用程序,它将跟踪用户位置跟踪(GPS 提供程序)并显示折线。我已经使用

实现了

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, 监听器);

在我的活动中。但是现在当用户从堆栈中关闭活动时,我无法获取位置更新。即使活动关闭,是否可以获得位置更新?

【问题讨论】:

标签: android android-activity google-maps-android-api-2 android-maps-v2


【解决方案1】:

https://github.com/googlesamples/android-play-location/tree/master/LocationUpdates

这是获取位置更新的安卓开发者源代码。

【讨论】:

    猜你喜欢
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-19
    • 2020-02-29
    • 2012-06-27
    相关资源
    最近更新 更多