Free Projects developed by Java, C# and PHP

Mouse catcher game app

We have many web application and mobile applications in GitHub for public use.

This project specifically developed to show how we can implement a simple 
android game in Android Studio with Java.

This project also demonstrated how we can implement rating and other custom 
dialog in android projects.

The project contains 4 main layouts described below:
	- Main Activity: is used as a home/landing page to show list of 
	  functions and options
	- Starter Activity: is used as a started activity to start the game and 
	  also show STOP and RESUME when the game is paused
	- Result Activity: is used to show the result/score of the game when one 
	  session is completed with options to REPLAY and EXIT
	- Setting Activity: is used to provide different preferences/setting for 
	  the game to be selected like complexity of the game

package com.btitsolutions.cookiecatcher;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.Toast;

public class SettingActivity extends AppCompatActivity implements View.OnClickListener {
    Button btnSave;
    RadioButton rdbtnEasy, rdbtnMedium, rdbtnHard;
    RadioButton rdbtnCatcherSlow, rdbtnCatcherMedium, rdbtnCatcherFast;

    protected void onCreate(Bundle savedInstanceState) {

        rdbtnEasy = (RadioButton)findViewById(;
        rdbtnMedium = (RadioButton)findViewById(;
        rdbtnHard = (RadioButton)findViewById(;

        rdbtnCatcherSlow = (RadioButton)findViewById(;
        rdbtnCatcherMedium = (RadioButton)findViewById(;
        rdbtnCatcherFast = (RadioButton)findViewById(;

        btnSave = (Button)findViewById(;

        SharedPreferences Game_Setting = getSharedPreferences("Game_Setting", Context.MODE_PRIVATE);
        String SelectedLevel = Game_Setting.getString("SelectedLevel", "Easy");
        String SelectedSensitivity = Game_Setting.getString("SelectedSensitivity", "Slow");

        else if(SelectedLevel.equals("Medium")){
        else if(SelectedLevel.equals("Hard")){

        else if(SelectedSensitivity.equals("Medium")){
        else if(SelectedSensitivity.equals("Fast")){

    public void onClick(View view) {
        SharedPreferences Game_Setting = getSharedPreferences("Game_Setting", Context.MODE_PRIVATE);
        String SelectedLevel = "";
        String SelectedSensitivity = "";

        if(rdbtnEasy.isChecked() == true){
            SelectedLevel = "Easy";
        else if(rdbtnMedium.isChecked() == true){
            SelectedLevel = "Medium";
        else if(rdbtnHard.isChecked() == true){
            SelectedLevel = "Hard";

        if(rdbtnCatcherSlow.isChecked() == true){
            SelectedSensitivity = "Slow";
        else if(rdbtnCatcherMedium.isChecked() == true){
            SelectedSensitivity = "Medium";
        else if(rdbtnCatcherFast.isChecked() == true){
            SelectedSensitivity = "Fast";

        SharedPreferences.Editor editor = Game_Setting.edit();
        editor.putString("SelectedLevel", SelectedLevel);
        editor.putString("SelectedSensitivity", SelectedSensitivity);

        Toast.makeText(this, "Saved Successfully.", Toast.LENGTH_SHORT).show();