在 android google api v2 中使用地理围栏

Using Geofence with google api v2 in android

我正在尝试在 google 位置 api-V2 中创建地理围栏,但是 class 在最新版本的 google 位置库中找不到 LocationClient。

有什么方法可以将地理围栏与 google api-V2

一起使用

你不能只使用 GeoFence api 吗? https://developer.android.com/reference/com/google/android/gms/location/Geofence.html, https://developer.android.com/reference/com/google/android/gms/location/GeofencingApi.html 否则这里有一个关于弃用 LocationClient 的线程:Android LocationClient class is deprecated but used in documentation

Aaahhhh..... GoogleApiClient class 正在这里工作:

LocationServices.GeofencingApi.addGeofences(apiClient, geoRequest, pendingIntent);