目前我使用以下方法定义Geofence。
Geofence geofence = new Geofence.Builder()
.setRequestId("GEOFENCE")
.setCircularRegion(latitude, longitude, radius)
.setExpirationDuration(Geofence.NEVER_EXPIRE)
.setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT)
.build();
现在我需要知道如何定义一个区域房间作为地理围栏以检测进入和离开房间。这可能吗?
答案 0 :(得分:1)
I dont think you can specify a rectangular geofence (radio waves are circular after all). You could geofence the door (very small fence, not sure if you could make it that small and be accurate) then detect people going through the door.