【问题标题】:Calling a method upon exiting Geofence退出地理围栏时调用方法
【发布时间】:2016-07-15 19:28:58
【问题描述】:

我想在用户退出地理围栏半径时调用一个方法,我不完全确定该怎么做。看来我必须使用 GeofenceTransitionsIntentService(),但我发现的只是过时的代码

【问题讨论】:

  • 你看起来有多努力? API 文档有一个完整的例子来说明如何做到这一点。只需使用条件检查您的地理围栏服务的onHandleIntent 中的geofenceTransition == Geofence.GEOFENCE_TRANSITION_EXITdeveloper.android.com/training/location/geofencing.html
  • 我很愚蠢,实际上就是这样。我希望我可以将其标记为答案!感谢您的帮助

标签: android location android-geofence


【解决方案1】:

API 文档有一个完整的例子来说明如何做到这一点。只需使用条件检查您的地理围栏服务的 onHandleIntent 中的geofenceTransition == Geofence.GEOFENCE_TRANSITION_EXITdeveloper.android.com/training/location/geofencing.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多