[JAVA] Introduction of Sudoku answer application "Sudoku automatic answer" (Android version) and its implementation function

Toddler Sunday Programming To the top

Introduction

"Sudoku Automatic Answer" (Android version) is an application that automatically solves the problem of Sudoku (Sudoku) when you take a picture and shows the answer. So, for example, you can shorten the time to solve a large number of questions in Sudoku's prize book, check the answers to questions that do not have answers, or check whether your own questions can be answered correctly. Can be used to do. ナンプレ自動解答画面

In this article, we will explain each function implemented in Sudoku automatic answer as Tips.

--Download the app here. --Click here to get the project source (https://devmart.jp/businesses/127). --The commentary article for the iOS version of "Sudoku Automatic Answer" is here.

Development / execution environment

Sudoku automatic answer is developed and executed in the following environment.

--Development environment: macOS, Android Studio (3.3 ~ 3.4), Java --Execution environment: Android 5.0 or above

Overview of app configuration

Sudoku automatic answer has two screens. One is a unique view that displays Sudoku problems (9x9 squares and numbers in each square) and accepts operations to edit the numbers, multiple buttons to call the function, and an advertisement (AdMob). .. The other is a camera screen that uses the Camera2 API to take pictures of Sudoku problems. In this application, the question of the library (9x9 squares) is cut out from the photograph taken by the camera, the number of each square is recognized, and it is imported as the target data to be answered, but for cutting out the squares, It uses OpenCV and uses the OCR library (tess-two) for number recognition. The answer process is the original heuristic algorithm.

Implemented features

In order to realize this application, the following functions are implemented and each will be explained as Tips.

--Incorporate AdMob (AdMob SDK) --Display ads (AdMob SDK) --Incorporate OpenCV library --Cut out a rectangular area from a photo (OpenCV) --Incorporate OCR library (tess-two) --Recognize characters with OCR function (tess-two) --Write the data stored in the asset to a file --Generate your own view (FrameLayout, View) --Draw in your own view (View) --Redraw the view after determining the screen layout (Frame Layout) --Implementing original camera function (Camera2) --Get permission to use the camera from the user --Exchange data between screens (activity) (Intent) --Save image (Bitmap) to file (FileOutputStream) --Cut out a part of the image (Bitmap) --Perform asynchronous processing (separate thread processing) (AsyncTaskLoader) --Display / turn off the waiting indicator (round and round) (Progress Bar) --Get the version number of the app (Package Manager) --Display the menu (Menu) --Customize the shape of the button (Button) --Multilingual support

Recommended Posts

Introduction of Sudoku answer application "Sudoku automatic answer" (Android version) and its implementation function
Introduction purpose of ActiveHash and simple flow to application implementation
[Vue.js] Implementation of menu function Implementation version rails6
[Vue.js] Implementation of menu function Vue.js introduction rails6
Android application implementation TIPS, reference site summary (function implementation)
[Rails] Implementation of drag and drop function (with effect)
Implementation of search function
Implementation of pagination function
Introduction to Android application development
[Rails 6] Implementation of search function
Implementation of image preview function
[Rails] Implementation of category function
Implementation of category pull-down function
[Rails] Implementation of tutorial function
[Rails] Implementation of like function
Let's create a TODO application in Java 6 Implementation of search function
[Rails] Implementation of coupon function (with automatic deletion function using batch processing)
[Rails] Implementation of tag function using acts-as-taggable-on and tag input completion function using tag-it