Sudoku Pattern Generator App

When i searched “Sudoku Number Pattern Generator”  App in Play Store ,all i got is some Sudoku Puzzle Game Generator and no correct result.So i decided to code a simple Sudoku Number Generator app using my  Sudoku Number Generator Java File(link).Sometimes, generating takes more time (you alter the code in your way) because we are using ArrayList for generating values.

In this article,i will demonstrate the app and how to develop this app.It might be a beginner level project and is easy to understand.

+++Please don’t add any startapp content+++

BF9D8BDF0EB8_Generic_1_PORTRAITsudoku generator

Download APK

Let’s Code!

1)   Requirement before Starting this Project:

1) Android Studio

2) Sudoku Generator File (please read  this tutorial for basic idea),this class will return the number in Array List Order.So,you just need to add a function for returning the values.

2) Create Android Project :

1) Create New Project in Android Studio : File  =>  New Project and fill the descriptions and click Next.

2) Fill the minimum SDK for the project, i use 4.0+

3) Copy-Paste the SudoGen.java file into src => main => java => (package)

4)There is no need to change anything in buid.gradle file and in AndroidManifest.xml

3) activity_main.xml :

4) Function For Calling SudokuGenerator :

if you are beginner and not used AsyncTask, please take a look at here.We use AsynTask mainly for running it in new Thread (force close happen if run in main thread).

Please start looking the code from onPreExecute(), doInBackground(), onPostExecute() order.

In onPreExecute(), we just enabled copy button and progress dialog.

In doInBackground(), values generated from SudoGen class is copied to bs (our 2-D array).

In onPostExecute(), we use append for adding values in to the textview.

5) MainActivity.java