@ReactMethod
    public void createTargets(final ReadableMap targetsMap) {
        ReadableMapKeySetIterator iter = targetsMap.keySetIterator();
        while (iter.hasNextKey()) {
            String key = iter.nextKey();
            ReadableMap targetMap = targetsMap.getMap(key);

            if (targetMap.hasKey("type") && targetMap.getString("type").equalsIgnoreCase("Object")) {
                // don't do anything for "Object" targets now
                continue;
            }

            if (!targetMap.hasKey("physicalWidth")) {
                throw new IllegalArgumentException("ARTrackingTargets - image target [" + key
                        + "] is missing `physicalWidth` prop.");
            }
            float physicalWidth = (float) targetMap.getDouble("physicalWidth");

            if (!targetMap.hasKey("orientation")) {
                throw new IllegalArgumentException("ARTrackingTargets - image target [" + key
                        + "] is missing `orientation` prop.");
            }
            String orientationValue = targetMap.getString("orientation");
            ARImageTarget.Orientation orientation =
                    ARImageTarget.Orientation.valueFromString(orientationValue);

            if (orientation == null) {
                throw new IllegalArgumentException("ARTrackingTargets - target [" + key
                        + "] has invalid orientation value [" + orientationValue + "]");
            }

            if (!targetMap.hasKey("source")) {
                throw new IllegalArgumentException("ARTrackingTargets - target [" + key
                        + "] is missing `source` prop.");
            }

            ReadableMap source = targetMap.getMap("source");

            ARTargetPromise promise = new ARTargetPromise(key, source, orientation, physicalWidth);
            promise.fetch(getReactApplicationContext());

            sPromiseMap.put(key, promise);
        }
    }
This method should be called only once and immediately after it is set.
android/viro_bridge/src/main/java/com/viromedia/bridge/module/ARTrackingTargetsModule.java