diff --git a/sudoku-android/README.md b/sudoku-android/README.md index 761ea6a..680eca1 100755 --- a/sudoku-android/README.md +++ b/sudoku-android/README.md @@ -13,6 +13,9 @@ To install the application on your device, type: mvn clean install android:deploy + +## For App Store upload + For signing and releasing it for the app store: mvn clean install -Pandroid,sign @@ -24,13 +27,16 @@ Make sure you've defined the necessary properties in your settings.xml, namely android.storepass Of course, you have to create a corresponding keystore and use your own storepass. - + +For upload to app store use + target/sudoku-android-aligned.apk. + +via the web interface of googles play store. ## TODOS - create a HUD with a frame so the user knows where to place the sudoku -- show ads only when solution is shown - translate to chinese - improvement of detection algorithm for the sudoku corners - parameter dialog / preferences @@ -40,6 +46,4 @@ Of course, you have to create a corresponding keystore and use your own storepas - progress bar implementieren: entlang dem bild unten einen bar der von rot auf grün wechselt, und je nach anzahl der erkannten nummern sich langsam füllt - mini thumb matrix links oben anzeigen von erkannten zahlen -- integrate opencv correctly (maybe even without opencv manager) - diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.0.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.0.so new file mode 100644 index 0000000..028ab7d Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.0.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.3.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.3.so new file mode 100644 index 0000000..48cbdd0 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.0.3.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.1.1.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.1.1.so new file mode 100644 index 0000000..7fe5087 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.1.1.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.2.0.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.2.0.so new file mode 100644 index 0000000..15827d8 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.2.0.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.3.0.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.3.0.so new file mode 100644 index 0000000..ec1edfb Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.3.0.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.4.0.so b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.4.0.so new file mode 100644 index 0000000..1bcd733 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libnative_camera_r4.4.0.so differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libopencv_androidcamera.a b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_androidcamera.a new file mode 100644 index 0000000..e27beed Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_androidcamera.a differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libopencv_core.a b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_core.a new file mode 100644 index 0000000..02ea2e2 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_core.a differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libopencv_highgui.a b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_highgui.a new file mode 100644 index 0000000..7984fe3 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_highgui.a differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libopencv_imgproc.a b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_imgproc.a new file mode 100644 index 0000000..ac9b559 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_imgproc.a differ diff --git a/sudoku-android/src/main/libs/armeabi-v7a/libopencv_java.so b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_java.so new file mode 100644 index 0000000..c8d6e28 Binary files /dev/null and b/sudoku-android/src/main/libs/armeabi-v7a/libopencv_java.so differ diff --git a/sudoku-android/src/main/scala/net/ladstatt/apps/sudoku/android/SudokuCapturer.scala b/sudoku-android/src/main/scala/net/ladstatt/apps/sudoku/android/SudokuCapturer.scala index 8775b55..c4585d8 100644 --- a/sudoku-android/src/main/scala/net/ladstatt/apps/sudoku/android/SudokuCapturer.scala +++ b/sudoku-android/src/main/scala/net/ladstatt/apps/sudoku/android/SudokuCapturer.scala @@ -9,20 +9,42 @@ import _root_.android.widget.{Button, FrameLayout} import com.google.ads.{AdRequest, AdSize, AdView} import net.ladstatt.apps.sudoku._ import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2 -import org.opencv.android.{BaseLoaderCallback, CameraBridgeViewBase, LoaderCallbackInterface, OpenCVLoader} +import org.opencv.android.{CameraBridgeViewBase, OpenCVLoader} import org.opencv.core._ import scala.concurrent.Await import scala.concurrent.duration._ -object SudokuCapturer { + +trait CanLog { + val TAG = "SudokuCapturer" + + def logInfo(message: String): Unit = { + Log.i(TAG, message) + () + } + + def logError(message: String): Unit = { + Log.e(TAG, message) + () + } + + def loadOpenCV(): Unit = { + if (OpenCVLoader.initDebug()) { + logInfo("OpenCV initialized successfully.") + } else { + logError("Could not initialize OpenCV properly.") + } + } } +object SudokuCapturer extends CanLog { + loadOpenCV() +} -class SudokuCapturer extends Activity with CvCameraViewListener2 { - import net.ladstatt.apps.sudoku.android.SudokuCapturer._ +class SudokuCapturer extends Activity with CvCameraViewListener2 with CanLog { var cameraView: CameraBridgeViewBase = _ var rescanButton: Button = _ @@ -38,28 +60,20 @@ class SudokuCapturer extends Activity with CvCameraViewListener2 { var digitLibrary: DigitLibrary = defaultLibrary var hitCounts: HitCounters = defaultHitCounts - def logInfo(message: String): Unit = { - Log.i(TAG, message) - () - } - def logError(message: String): Unit = { - Log.e(TAG, message) - () - } - - val mLoaderCallback: BaseLoaderCallback = new BaseLoaderCallback(this) { - override def onManagerConnected(status: Int) { - status match { - case LoaderCallbackInterface.SUCCESS => { - Log.i(TAG, "OpenCV loaded successfully") - cameraView.enableView() + /* + val mLoaderCallback: BaseLoaderCallback = new BaseLoaderCallback(this) { + override def onManagerConnected(status: Int) { + status match { + case LoaderCallbackInterface.SUCCESS => { + Log.i(TAG, "OpenCV loaded successfully") + cameraView.enableView() + } + case _ => super.onManagerConnected(status) } - case _ => super.onManagerConnected(status) } } - } - + */ def initAssets(): Unit = { TemplateLibrary.getResourceAsStream = getAssets().open @@ -85,7 +99,7 @@ class SudokuCapturer extends Activity with CvCameraViewListener2 { digitLibrary = defaultLibrary hitCounts = defaultHitCounts rescanButton.setVisibility(View.GONE) - // adView.setVisibility(View.GONE) + // adView.setVisibility(View.GONE) solution = null } @@ -101,6 +115,7 @@ class SudokuCapturer extends Activity with CvCameraViewListener2 { handler = new Handler() rescanButton.setVisibility(View.GONE) adView.setVisibility(View.VISIBLE) + cameraView.enableView() } override def onBackPressed(): Unit = { @@ -122,7 +137,8 @@ class SudokuCapturer extends Activity with CvCameraViewListener2 { override def onResume(): Unit = { super.onResume() logInfo("onResume called") - OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mLoaderCallback) + loadOpenCV() + //OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mLoaderCallback) () } @@ -170,7 +186,7 @@ class SudokuCapturer extends Activity with CvCameraViewListener2 { case s: SSuccess => { execOnUIThread({ rescanButton.setVisibility(View.VISIBLE) - // adView.setVisibility(View.VISIBLE) + // adView.setVisibility(View.VISIBLE) }) solution = s.solutionMat solution diff --git a/sudoku-android/src/site/markdown/releases.md b/sudoku-android/src/site/markdown/releases.md index 612fbd6..338fa92 100644 --- a/sudoku-android/src/site/markdown/releases.md +++ b/sudoku-android/src/site/markdown/releases.md @@ -22,7 +22,10 @@ ## Release 2.1 (unreleased) -- Included OpenCV libraries in the apk, now OpenCV Manager Download necessary anymore +## Release 1.6 (21. 6 2015) + +- Included OpenCV libraries in the apk, no separate OpenCV Manager Download necessary anymore +- Ads are shown again permanently ## Release 1.5 (6. April 2015) [VersionCode 7, Version Name 1.5]