@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { mOpenCVInitiated = true; CameraGestureSensor.loadLibrary(); mGestureSensor.start(); } break; default: { super.onManagerConnected(status); } break; } }
/** Called when the activity is resumed. The gesture detector is initialized. */ @Override public void onResume() { super.onResume(); if (!mOpenCVInitiated) return; mGestureSensor.start(); }