diff --git a/android/service/doc/JavaHelper.rst b/android/service/doc/JavaHelper.rst index 5304f02f6e..41e07ef6b9 100644 --- a/android/service/doc/JavaHelper.rst +++ b/android/service/doc/JavaHelper.rst @@ -38,10 +38,6 @@ boolean initAsync() OpenCV version constants ------------------------- -.. data:: OPENCV_VERSION_2_4_0 - - OpenCV Library version 2.4.0 - .. data:: OPENCV_VERSION_2_4_2 OpenCV Library version 2.4.2 diff --git a/doc/tutorials/introduction/android_binary_package/android_binary_package.rst b/doc/tutorials/introduction/android_binary_package/android_binary_package.rst index 2096ceb774..d8a457bf22 100644 --- a/doc/tutorials/introduction/android_binary_package/android_binary_package.rst +++ b/doc/tutorials/introduction/android_binary_package/android_binary_package.rst @@ -379,7 +379,7 @@ There is a very base code snippet for Async init. It shows only basis principles super.onCreate(savedInstanceState); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/modules/java/generator/src/java/android+OpenCVLoader.java b/modules/java/generator/src/java/android+OpenCVLoader.java index c9b64976a7..dd4ee53d55 100644 --- a/modules/java/generator/src/java/android+OpenCVLoader.java +++ b/modules/java/generator/src/java/android+OpenCVLoader.java @@ -8,14 +8,9 @@ import android.content.Context; public class OpenCVLoader { /** - * OpenCV Library version 2.4.0 + * OpenCV Library version 2.4.2 */ - public static final String OPEN_CV_VERSION_2_4_0 = "2.4.0"; - - /** - * OpenCV Library version 2.4.0 - */ - public static final String OPEN_CV_VERSION_2_4_2 = "2.4.2"; + public static final String OPENCV_VERSION_2_4_2 = "2.4.2"; /** * Load and initialize OpenCV library from current application package. Roughly it is analog of system.loadLibrary("opencv_java") diff --git a/samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15Activity.java b/samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15Activity.java index f0c076cd60..a631ff0262 100644 --- a/samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15Activity.java +++ b/samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15Activity.java @@ -94,7 +94,7 @@ public class puzzle15Activity extends Activity requestWindowFeature(Window.FEATURE_NO_TITLE); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java index e4629e1857..0c613f058c 100644 --- a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java +++ b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java @@ -52,7 +52,7 @@ public class ColorBlobDetectionActivity extends Activity { { Log.i(TAG, "Instantiated new " + this.getClass()); } - + @Override protected void onPause() { Log.i(TAG, "onPause"); @@ -66,29 +66,28 @@ public class ColorBlobDetectionActivity extends Activity { Log.i(TAG, "onResume"); super.onResume(); if( (null != mView) && !mView.openCamera() ) { - AlertDialog ad = new AlertDialog.Builder(this).create(); - ad.setCancelable(false); // This blocks the 'BACK' button - ad.setMessage("Fatal error: can't open camera!"); - ad.setButton("OK", new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - finish(); - } - }); + AlertDialog ad = new AlertDialog.Builder(this).create(); + ad.setCancelable(false); // This blocks the 'BACK' button + ad.setMessage("Fatal error: can't open camera!"); + ad.setButton("OK", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + finish(); + } + }); ad.show(); } } /** Called when the activity is first created. */ @Override - public void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { Log.i(TAG, "onCreate"); super.onCreate(savedInstanceState); - + requestWindowFeature(Window.FEATURE_NO_TITLE); - Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java b/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java index 7359ea313c..a1b85f1d16 100644 --- a/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java +++ b/samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java @@ -107,7 +107,7 @@ public class FdActivity extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java b/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java index 03c4cca386..79af622e6c 100644 --- a/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java +++ b/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java @@ -107,9 +107,9 @@ public class ImageManipulationsActivity extends Activity { Log.i(TAG, "onCreate"); super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); - + Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/tutorial-0-androidcamera/src/org/opencv/samples/tutorial0/Sample0Base.java b/samples/android/tutorial-0-androidcamera/src/org/opencv/samples/tutorial0/Sample0Base.java index e06b508f3a..a52aba4050 100644 --- a/samples/android/tutorial-0-androidcamera/src/org/opencv/samples/tutorial0/Sample0Base.java +++ b/samples/android/tutorial-0-androidcamera/src/org/opencv/samples/tutorial0/Sample0Base.java @@ -38,8 +38,8 @@ public class Sample0Base extends Activity { ad.setMessage("Fatal error: can't open camera!"); ad.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - finish(); + dialog.dismiss(); + finish(); } }); ad.show(); diff --git a/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1Java.java b/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1Java.java index d385409fe1..3c113ee586 100644 --- a/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1Java.java +++ b/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1Java.java @@ -75,8 +75,8 @@ public class Sample1Java extends Activity { ad.setMessage("Fatal error: can't open camera!"); ad.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - finish(); + dialog.dismiss(); + finish(); } }); ad.show(); @@ -91,7 +91,7 @@ public class Sample1Java extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2NativeCamera.java b/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2NativeCamera.java index 69012bce1f..5589ccd2c3 100644 --- a/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2NativeCamera.java +++ b/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2NativeCamera.java @@ -82,7 +82,7 @@ public class Sample2NativeCamera extends Activity { ad.setMessage("Fatal error: can't open camera!"); ad.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); + dialog.dismiss(); finish(); } }); @@ -97,7 +97,7 @@ public class Sample2NativeCamera extends Activity { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/tutorial-3-native/src/org/opencv/samples/tutorial3/Sample3Native.java b/samples/android/tutorial-3-native/src/org/opencv/samples/tutorial3/Sample3Native.java index 6d67de31eb..aafd3b1356 100644 --- a/samples/android/tutorial-3-native/src/org/opencv/samples/tutorial3/Sample3Native.java +++ b/samples/android/tutorial-3-native/src/org/opencv/samples/tutorial3/Sample3Native.java @@ -73,8 +73,8 @@ public class Sample3Native extends Activity { ad.setMessage("Fatal error: can't open camera!"); ad.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - finish(); + dialog.dismiss(); + finish(); } }); ad.show(); @@ -88,7 +88,7 @@ public class Sample3Native extends Activity { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); } diff --git a/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4Mixed.java b/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4Mixed.java index 13798c9a48..390076b000 100644 --- a/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4Mixed.java +++ b/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4Mixed.java @@ -98,7 +98,7 @@ public class Sample4Mixed extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); Log.i(TAG, "Trying to load OpenCV library"); - if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack)) + if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_2, this, mOpenCVCallBack)) { Log.e(TAG, "Cannot connect to OpenCV Manager"); }