Google地图是否与locationListener方法重叠?

问题描述 投票:-1回答:1

我在项目mainActivity上使用Google地图。我也需要在后台获取位置,因此创建了一个包含locationListener的服务。它在启用/禁用提供程序时正常工作,但不更新位置。可能谷歌地图导致吗?

android google-maps broadcastreceiver android-service
1个回答
0
投票

我觉得你可能正在努力解决有关android O(https://developer.android.com/about/versions/oreo/background-location-limits)背景位置更新的限制问题。您可以考虑调用前​​台服务。有关如何在前台服务中使用位置记录的指南,这里是我之前制作的一些代码(https://github.com/kris-geyer/pegLog

© www.soinside.com 2019 - 2024. All rights reserved.