1793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerpackage org.opencv.android; 2793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 3793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/** 4793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * Interface for callback object in case of asynchronous initialization of OpenCV. 5793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 6793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerpublic interface LoaderCallbackInterface 7793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 8793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 9793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * OpenCV initialization finished successfully. 10793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 11793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler static final int SUCCESS = 0; 12793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 13793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * Google Play Market cannot be invoked. 14793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 15793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler static final int MARKET_ERROR = 2; 16793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 17793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * OpenCV library installation has been canceled by the user. 18793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 19793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler static final int INSTALL_CANCELED = 3; 20793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 21793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required. 22793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 23793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler static final int INCOMPATIBLE_MANAGER_VERSION = 4; 24793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 25793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * OpenCV library initialization has failed. 26793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 27793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler static final int INIT_FAILED = 0xff; 28793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 29793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 30793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * Callback method, called after OpenCV library initialization. 31793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * @param status status of initialization (see initialization status constants). 32793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 33793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler public void onManagerConnected(int status); 34793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 35793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler /** 36793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * Callback method, called in case the package installation is needed. 37793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * @param callback answer object with approve and cancel methods and the package description. 38793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 39793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler public void onPackageInstall(final int operation, InstallCallbackInterface callback); 40793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 41