Loader Callback Interface

Platforms: Android

class org.opencv.android.LoaderCallbackInterface

Interface for callback object in case of asynchronous initialization of OpenCV

void onManagerConnected()

void onManagerConnected(int status)

Callback method that is called after OpenCV library initialization

Parameters:status – Status of initialization. See Initialization status constants

void onPackageInstall()

void onPackageInstall(InstallCallbackInterface Callback)

Callback method that is called in case when package installation is needed

@param callback Answer object with approve and cancel methods and package description

Initialization status constants

org.opencv.android.SUCCESS

OpenCV initialization finished successfully

org.opencv.android.RESTART_REQUIRED

OpenCV library installation via Google Play service was initialized. Application restart is required

org.opencv.android.MARKET_ERROR

Google Play (Android Market) cannot be invoked

org.opencv.android.INSTALL_CANCELED

OpenCV library installation was canceled by user

org.opencv.android.INCOMPATIBLE_MANAGER_VERSION

Version of OpenCV Manager Service is incompatible with this app. Service update is needed

org.opencv.android.INIT_FAILED

OpenCV library initialization failed