Problem with load OpenCV in Android Service

asked 2013-05-15 01:59:51 -0500

FreeVMS gravatar image

Problem with load OpenCV in Android Service. OpenCV load successfull, but have one question - when OpenCV Manager don't install, Alert dialog "Package not found" don't show.

private void mOpenCVLoader() {
        Log.i(TAG, "Trying to load OpenCV library");
        if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_4, this,
                mOpenCVCallBack)) {
            Log.e(TAG, "Cannot connect to OpenCV Manager");
        }
    }

Log:

05-15 09:53:25.898: E/AndroidRuntime(12558): FATAL EXCEPTION: main
05-15 09:53:25.898: E/AndroidRuntime(12558): java.lang.RuntimeException: Unable to create service sample.stand.keyboard.Keyboard_Service: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
edit retag flag offensive close merge delete