Open binhjy opened 8 years ago
Same here, Is anyone able to compile for version 5 and above ?
You can replace the function initOpenCv inside AsyncServiceHelper, with this to make the intent explicit:
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; } }
Thanks this worked like a charm! my app was crashing before it could even start up. However, now my app is crashing after about 5 seconds of runtime. I haven't made any changes to the code other than the initOpenCv. It crashes 5 seconds after startup on my Sammy S5 and almost immediately on my Sammy S8. Thanks!
Hi there. In class AsyncServiceHelper, set the instalation package. Do:
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))
Hi tuan, is this app doesn't work on smartphone version 5.0 and higher? When i use, it's crashed about 5 seconds.