OpenCV loading failed on Huawei BTV-W09

asked 2016-11-16 09:09:10 -0500

AMEMB gravatar image

updated 2016-11-16 09:10:03 -0500

Hallo,

I am working with OpenCV4android version 2.4.11, the way i load openCV library as shown below in the code works fine on Samsung device, but when I tried the same code on Huawei MediaPad with Android version 6 the App does not start and i receive the following error

W/System.err:     at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:66)
W/System.err:     at org.opencv.android.OpenCVLoader.initDebug(OpenCVLoader.java:66)
W/ContextImpl: Implicit intents with startService are not safe: Intent { act=org.opencv.engine.BIND } android.content.ContextWrapper.bindService:604 org.opencv.android.AsyncServiceHelper.initOpenCV:24 org.opencv.android.OpenCVLoader.initAsync:89 
E/OpenCVLoader/BaseLoaderCallback: OpenCV loading failed!

please let me know what should i do to load opencv correctly on Huawei?

thank you

code:

public class FragOpenCVCam extends Fragment implements CameraBridgeViewBase.CvCameraViewListener2, View.OnTouchListener {

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(getActivity()) {
    @Override
    public void onManagerConnected(int status) {
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                mOpenCvCameraView.enableView();
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};
}

...
...
...

@Override
public void onResume() {
    super.onResume();
    Log.w(TAG, "onResume");

    if (!OpenCVLoader.initDebug()) {
        Log.d(TAG, "Internal OpenCV library not found. Using OpenCV Manager for initialization");
        OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_11, getActivity(), mLoaderCallback);
    } else {
        Log.d(TAG, "OpenCV library found inside package. Using it!");
        mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
    }
}
edit retag flag offensive close merge delete