똑같은 앱을 두 기기에 설치해주고 한 기기에서 geofence를 만들면 다른 기기에서는 만들어진 geofence 안에 들어갔는지 확인이 되는 건가요?
코드는 아래와 같은데 '//noticication' 이 있는 부분에서 확인이 되어야 하는게 맞는 건가요?
protected void onHandleIntent(Intent intent) {
GeofencingEvent event = GeofencingEvent.fromIntent(intent);
List<Geofence> triggeringGeofences = event.getTriggeringGeofences();
ArrayList triggeringGeofencesIdsList = new ArrayList();
for (Geofence geofence : triggeringGeofences)
triggeringGeofencesIdsList.add(geofence.getRequestId());
String IDs = TextUtils.join(", ", triggeringGeofencesIdsList);
int transitiontype = event.getGeofenceTransition();
if (transitiontype == Geofence.GEOFENCE_TRANSITION_ENTER) {
//notification
}
if (transitiontype == Geofence.GEOFENCE_TRANSITION_EXIT) {
Log.i("haha", "Exit from " + IDs);
Toast.makeText(this, "Exit from" + IDs, Toast.LENGTH_LONG).show();
}
}