@Override
 public void onResume() {
   super.onResume();
   if (!OpenCVLoader.initDebug()) {
     Log.d(TAG, "Internal OpenCV library not found. Using OpenCV Manager for initialization");
     OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, mLoaderCallback);
   } else {
     Log.d(TAG, "OpenCV library found inside package. Using it!");
     mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
   }
 }
Beispiel #2
0
  @Override
  public void onResume() {
    super.onResume();

    if (!OpenCVLoader.initDebug()) {
      Timber.d("Internal OpenCV library not found.");
      OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_1_0, this, mLoaderCallback);
    } else {
      Timber.d("OpenCV library found in package.");
      mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
    }
  }
  @Override
  public void onResume() {
    super.onResume();
    if (!OpenCVLoader.initDebug()) {
      OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_10, this, mLoaderCallback);
    } else {
      mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
    }

    if (mGoogleApiClient.isConnected()) startLocationUpdates();

    // Legacy compass sensor
    /*mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION),
    SensorManager.SENSOR_DELAY_GAME);*/

    mSensorManager.registerListener(this, gSensor, SensorManager.SENSOR_DELAY_UI);
    mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_UI);
    mSensorManager.registerListener(
        this,
        mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),
        SensorManager.SENSOR_DELAY_UI);
  }