【发布时间】:2016-07-15 19:28:58
【问题描述】:
我想在用户退出地理围栏半径时调用一个方法,我不完全确定该怎么做。看来我必须使用 GeofenceTransitionsIntentService(),但我发现的只是过时的代码
【问题讨论】:
-
你看起来有多努力? API 文档有一个完整的例子来说明如何做到这一点。只需使用条件检查您的地理围栏服务的
onHandleIntent中的geofenceTransition == Geofence.GEOFENCE_TRANSITION_EXIT:developer.android.com/training/location/geofencing.html -
我很愚蠢,实际上就是这样。我希望我可以将其标记为答案!感谢您的帮助
标签: android location android-geofence