Android Open Source - SudokuSolver Store Helper






From Project

Back to project page SudokuSolver.

License

The source code is released under:

License JSON Sudoku Solver is covered under the Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/ Credits Sudoku Solver Java implementation: Kevin Coulombe...

If you think the Android project SudokuSolver listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * JSON Sudoku solver is covered under the Creative Commons Attribution 3.0 Unported License
 * http://creativecommons.org/licenses/by/3.0/
 * /*from   w w  w.j av a 2 s .c o m*/
 * @author: Andrea Bizzotto {@link www.musevisions.com}, {@link www.bizzotto.biz}
 * @email: bizz84dev@gmail.com
 */
package com.musevisions.android.SudokuSolver;

import android.content.Context;

public class StoreHelper {

  static public enum Store {
    GOOGLE_PLAY_STORE,
    AMAZON_APP_STORE,
    SLIDE_ME,
  }
  Store mStore;
  String mLink;
  
  public StoreHelper(Context context, int storeId, int... id) {
  
    String str = context.getString(storeId);
    if (str.equals("Google")) {
      mStore = Store.GOOGLE_PLAY_STORE;
    }
    else if (str.equals("Amazon")) {
      mStore = Store.AMAZON_APP_STORE;
    }
    else if (str.equals("SlideMe")) {
      mStore = Store.SLIDE_ME;
    }
    else
      mStore = Store.GOOGLE_PLAY_STORE;
    int index = mStore.ordinal() < id.length ? mStore.ordinal() : 0;
    mLink = context.getString(id[index]);
  }
  public Store getStore() { 
    return mStore;
  }
  public String getLink() {
    return mLink;
  }
}




Java Source Code List

com.musevisions.android.SudokuSolver.CustomDialogs.java
com.musevisions.android.SudokuSolver.GridView.java
com.musevisions.android.SudokuSolver.HttpPostUtils.java
com.musevisions.android.SudokuSolver.JSONHelper.java
com.musevisions.android.SudokuSolver.MainTabActivity.java
com.musevisions.android.SudokuSolver.StoreHelper.java
com.musevisions.android.SudokuSolver.SudokuCore.java
com.musevisions.android.SudokuSolver.SudokuLoaderActivity.java
com.musevisions.android.SudokuSolver.SudokuRetrieverTask.java
com.musevisions.android.SudokuSolver.SudokuRetriever.java
com.musevisions.android.SudokuSolver.SudokuSolverActivity.java
com.musevisions.android.SudokuSolver.SudokuSolverBruteForce.java
com.musevisions.android.SudokuSolver.SudokuSolverOptimised.java
com.musevisions.android.SudokuSolver.SudokuSolverTask.java