草庐IT

setNumUpdates

全部标签

android - Android 上的定期前台位置跟踪

我正在为Android创建自定义Phonegap插件,该插件在应用程序处于前台和后台时监控位置。关于使用FusedLocationProviderAPI的Google文档非常清楚。到目前为止,我制定的流程如下确保API可用GoogleApiAvailabilityapi=GoogleApiAvailability.getInstance();intcode=api.isGooglePlayServicesAvailable(ctxt);return(code==ConnectionResult.SUCCESS);定义一个具有分配回调的LocationListener,以处理reques