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


/** Minimal floor detection example */
private IARegion.Listener mRegionListener = new IARegion.Listener() {
    IARegion mCurrentFloorPlan = null;

    @Override
    public void onEnterRegion(IARegion region) {
        if (region.getType() == IARegion.TYPE_FLOOR_PLAN) {
            Log.d(TAG, "Entered " + region.getName());
            Log.d(TAG, "floor plan ID: " + region.getId());
            mCurrentFloorPlan = region;
        }
    }

    @Override
    public void onExitRegion(IARegion region) {}
};



Region listeners are also registered to the IALocationManager


mIALocationManager.registerRegionListener(mRegionListener);



Note that there are several complete examples in the IndoorAtlas Android Examples


LockFloor aka Disabling automatic floor detection


Even though this is not recommended, you can substitute IndoorAtlas floor detection with your own by providing an explicit floor number.

Locking positioning can be done by using the new lockFloor method in IALocationManager. In addition to locking, method unlockFloor is provided so positioning can be unlocked from the specific floor.

// Lock position to floor number 3
mLocationManager.lockFloor(3);

// Unlock positioning so floor level is detected automatically
mLocationManager.unlockFloor();