【发布时间】:2018-02-06 10:32:02
【问题描述】:
我有一个服务正在运行,它会定期获取用户的位置。我刚刚迁移了所有代码以支持 Android O。即。我摆脱了FusedLocationAPI 和GoogleApiClient。根据此处的指南,我已将它们替换为 FusedLocationProviderClient:
https://developer.android.com/training/location/receive-location-updates.html
我的问题是我应该如何确保我的应用程序支持所有 android API - 直到 O拥有 Google Play 商店的最新更新。所以看来我应该检查游戏商店版本:if (not newest play-store and version < Android-O) use fusedLocationAPI, else if (newest play-store and version>=O) use FusedLocationProviderClient.
有人对支持尽可能多的设备有任何意见吗?
【问题讨论】:
标签: android service google-play-services fusedlocationproviderapi google-location-services