public void wait_install() { InstallServiceQuiet(AppContext); } };
/** * Loads and initializes OpenCV library using OpenCV Engine service. * @param Version OpenCV library version. * @param AppContext application context for connecting to the service. * @param Callback object, that implements LoaderCallbackInterface for handling the connection status. * @return Returns true if initialization of OpenCV is successful. */ public static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback) { return AsyncServiceHelper.initOpenCV(Version, AppContext, Callback); } }
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); Intent intent = new Intent("org.opencv.engine.BIND"); intent.setPackage("org.opencv.engine"); if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
private boolean initOpenCVLibs(String Path, String Libs) { Log.d(TAG, "Trying to init OpenCV libs"); if ((null != Path) && (Path.length() != 0)) { boolean result = true; if ((null != Libs) && (Libs.length() != 0)) { Log.d(TAG, "Trying to load libs by dependency list"); StringTokenizer splitter = new StringTokenizer(Libs, ";"); while (splitter.hasMoreTokens()) { String AbsLibraryPath = Path + File.separator + splitter.nextToken(); result &= loadLibrary(AbsLibraryPath); } } else { // If the dependencies list is not defined or empty. String AbsLibraryPath = Path + File.separator + "libopencv_java3.so"; result &= loadLibrary(AbsLibraryPath); } return result; } else { Log.d(TAG, "Library path \"" + Path + "\" is empty"); return false; } } }
if (null == mEngineService) { Log.d(TAG, "OpenCV Manager Service connection fails. May be service was not installed?"); InstallService(mAppContext, mUserAppCallback); } else { mServiceInstallationProgress = false;
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); Intent intent = new Intent("org.opencv.engine.BIND"); intent.setPackage("org.opencv.engine"); if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
result &= loadLibrary(AbsLibraryPath); result &= loadLibrary(AbsLibraryPath);
InstallService(mAppContext, mUserAppCallback);
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); Intent intent = new Intent("org.opencv.engine.BIND"); intent.setPackage("org.opencv.engine"); if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
public void wait_install() { InstallServiceQuiet(AppContext); } };
result &= loadLibrary(AbsLibraryPath); result &= loadLibrary(AbsLibraryPath);
InstallService(mAppContext, mUserAppCallback);
/** * Loads and initializes OpenCV library using OpenCV Engine service. * @param Version OpenCV library version. * @param AppContext application context for connecting to the service. * @param Callback object, that implements LoaderCallbackInterface for handling the connection status. * @return Returns true if initialization of OpenCV is successful. */ public static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback) { return AsyncServiceHelper.initOpenCV(Version, AppContext, Callback); } }
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); if (AppContext.bindService(new Intent("org.opencv.engine.BIND"), helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
public void wait_install() { InstallServiceQuiet(AppContext); } };
result &= loadLibrary(AbsLibraryPath); result = loadLibrary(AbsLibraryPath);
InstallService(mAppContext, mUserAppCallback);
/** * Loads and initializes OpenCV library using OpenCV Engine service. * @param Version OpenCV library version. * @param AppContext application context for connecting to the service. * @param Callback object, that implements LoaderCallbackInterface for handling the connection status. * @return Returns true if initialization of OpenCV is successful. */ public static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback) { return AsyncServiceHelper.initOpenCV(Version, AppContext, Callback); } }
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); Intent intent = new Intent("org.opencv.engine.BIND"); intent.setPackage("org.opencv.engine"); if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }
public void wait_install() { InstallServiceQuiet(AppContext); } };