Floor detection

The automatic recognition of floor plans, locations (a.k.a. venues) and indoor-outdoor-transitions are handled in the IndoorAtlas SDK with IARegion events

private IARegion.Listener mRegionListener = new IARegion.Listener() {
    // when null, we are not on any mapped area
    // this information can be used for indoor-outdoor detection
    IARegion mCurrentFloorPlan = null;

    public void onEnterRegion(IARegion region) {
        if (region.getType() == IARegion.TYPE_FLOOR_PLAN) {
            // triggered when entering the mapped area of the given floor plan
            Log.d(TAG, "Entered " + region.getName());
            Log.d(TAG, "floor plan ID: " + region.getId());
            mCurrentFloorPlan = region;
        else if (region.getType() == IARegion.TYPE_VENUE) {
            // triggerend when near a new location
            Log.d(TAG, "Location changed to " + region.getId());

    public void onExitRegion(IARegion region) {
        // leaving a previously entered region
        if (region.getType() == IARegion.TYPE_FLOOR_PLAN) {
            mCurrentFloorPlan = null;
            // notice that a change of floor plan (e.g., floor change)
            // is signaled by an exit-enter pair so ending up here
            // does not yet mean that the device is outside any mapped area

Region listeners are also registered to the IALocationManager