public void wait(final ARTargetPromiseListener listener) {
            // The sync block is to guard the mReady check and the addition of the listener
            synchronized (this) {
                if (mReady) {
                    // we don't want to invoke the onComplete in the sync block, so post a Runnable
                    // on this thread to invoke it.
                    new Handler().post(new Runnable() {
                        @Override
                        public void run() {
                            listener.onComplete(mKey, mARImageTarget);
                        }
                    });
                } else {
                    mPromiseListeners.add(listener);
                }
            }
        }
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