void render() {
    // Get the image tracker
    TrackerManager trackerManager = TrackerManager.getInstance();
    ObjectTracker objectTracker =
        (ObjectTracker) (trackerManager.getTracker(ObjectTracker.getClassType()));

    // Get the frame quality from the target builder
    ImageTargetBuilder targetBuilder = objectTracker.getImageTargetBuilder();
    int frameQuality = targetBuilder.getFrameQuality();

    // Update the UI internal state variables
    updateUIState(targetBuilder, frameQuality);

    if (curStatus == STATUS.STATUS_SUCCESS) {
      curStatus = STATUS.STATUS_IDLE;

      Log.d(LOGTAG, "Built target, reactivating dataset with new target");
      mActivity.doStartTrackers();
    }

    // Renders the hints
    switch (curStatus) {
      case STATUS_SCANNING:
        renderScanningViewfinder(frameQuality);
        break;
      default:
        break;
    }

    SampleUtils.checkGLError("RefFreeFrame render");
  }
 void deInit() {
   TrackerManager trackerManager = TrackerManager.getInstance();
   ObjectTracker objectTracker =
       (ObjectTracker) (trackerManager.getTracker(ObjectTracker.getClassType()));
   if (objectTracker != null) {
     ImageTargetBuilder targetBuilder = objectTracker.getImageTargetBuilder();
     if (targetBuilder != null
         && (targetBuilder.getFrameQuality()
             != ImageTargetBuilder.FRAME_QUALITY.FRAME_QUALITY_NONE)) {
       targetBuilder.stopScan();
     }
   }
 }