Final Mad Report
Final Mad Report
Final Mad Report
JnanaSangama, Belgaum-590014
“FUSE – Minigames”
Submitted in Partial fulfilment of the Requirements for the VI Semester of the Degree of
Bachelor of Engineering
In
Computer Science & Engineering
By
ANANYA BHOMBORE
(1CE19CS008)
FOZAIL AHMED
(1CE19CS031)
CERTIFICATE
This is to certified that the MOBILE APPLICATION DEVELOPMENT Mini Project work
entitled “FUSE – Minigames” has been carried out by ANANYA
BHOMBORE(1CE19CS008) and FOZAIL AHMED(1CE19CS031), bonafide students of
City Engineering College, in partial fulfilment for the award of Bachelor of Engineering in
Computer Science and Engineering of the Visvesvaraya Technological University,
Belgaum, during the year 2021-2022. It is certified that all corrections/suggestions indicated
for internal assessment have been incorporated in the report deposited in the departmental
library. The MOBILE APPLICATION DEVELOPMENT Mini Project Report has been
approved as it satisfies the academic requirements in the respect of project work prescribed for
the said Degree.
External Viva
Name of the examiners Signature with date
1.
2.
ABSTRACT
The objective of this Mini Project is to illustrate concepts and usage of inbuilt functions in
XML and Java for the development of an Android Application. The FUSE – Minigames is a
modular minigames app that contains a number of activities. The application is started with
splash activity which has an activity of its own. Key point for splash activity is to ensure that
in the manifest, the launching activity is set to Splash activity as our main launcher. Some of
the activities are Tic Tap Toe, Tap man, Tap That Song, Simon Tap, Reaction Tap and Leader
board. Keyboard and mouse can be used to interact with the project.
Using inbuilt functions of Java, the application can be navigated. The functions of the Buttons,
Spinner, Images are set using Java. XML functions are used to design the Animation, Media
player and other applications. Edit text and Font style is selected using XML functions.
Database implementation is done using SQLite.
i
ACKNOWLEDGEMENT
We would like to express our heartfelt gratitude to Dr.Thippeswamy H.N, CEC, Bangalore,
for extending his support.
We would also like to express our heartfelt gratitude to Dr. Sowmya Naik, HOD, Computer
Science and Engineering whose guidance and support was truly invaluable.
We are very grateful to our guide Mrs. Shashikala H C, Asst. Prof., Department of Computer
Science, for her able guidance and valuable advice at every stage of our project which helped
me in the successful completion of our project.
We would also have indebted to our Parent and Friends for their continued moral and material
support throughout the course of project and helping me in finalize the presentation.
Our heartful thanks to all those have contributed bits, bytes and words to accomplish this
project.
ANANYA BHOMBORE(1CE19CS008)
FOZAIL AHMED(1CE19CS031)
ii
TABLE OF CONTENTS
1. INTRODUCTION 1-5
1.1 Android……………………………………………………………………... 1
1.2 Java in android studio………………………………………………………. 3
1.3 Xml in android……………………………………………………………… 4
1.4 Project goal…………………………………………………………………. 5
1.5 Scope……………………………………………………………………….. 5
3. REQUIREMENTS 8
3.1 User requirements…………………………………………………………...8
3.2 Software requirements ……………………………………………………...8
3.3 Hardware requirements ……………………………………………………..8
4. SOFTWARE DESIGN 9
4.1 Proposed system ……………………………………………………………9
4.2 Packages ……………………………………………………………………9
4.3 Interaction …………………………………………………………………10
4.4 Main class …………………………………………………………………10
iii
5. IMPLEMENTATION 14-19
5.1 Source code…………………………………………………. … 14
6. SNAPSHOTS 20-24
8. REFERENCES 26
iv
LIST OF FIGURES
v
FUSE – mini games
Chapter 1
INTRODUCTION
1.1 Android
Android is a mobile operating system based on a modified version of the Linux kernel
and other open-source software, designed primarily for touchscreen mobile devices such as
smartphones and tablets. Android is developed by a consortium of developers known as the
Open Handset Alliance and commercially sponsored by Google.
Messaging
SMS and MMS are available forms of messaging, including threaded text messaging and
Android Cloud To Device Messaging (C2DM) and now enhanced version of C2DM, Android
Google Cloud Messaging (GCM) is also a part of Android Push Messaging services. Android
phones also have the ability to send and receive RCS via the messages app (if supported by
the carrier).
Web browser
The web browser available in Android is based on the open-source Blink (previously
WebKit) layout engine, coupled with Chromium's V8 JavaScript engine. Then the
WebKitusing Android Browser scored 100/100 on the Acid3 test on Android 4.0 ICS; the
Blinkbased browser currently has better standards support. The old web browser is variably
known as 'Android Browser', 'AOSP browser', 'stock browser', 'native browser', and 'default
browser'
(from the time it was always the default). Starting with Android 4.4 KitKat, Google has
begun licensing Google Chrome (a proprietary software) separately from Android, but
usually bundled with (what most device vendors did). Since Android 5.0 Lollipop, the
WebView browser that apps can use to display web content without leaving the app has been
separated from the rest of the Android firmware in order to facilitate separate security updates
by Google.
Voice-based features
Google search through voice has been available since initial release. Voice actions for calling,
texting, navigation, etc. are supported on Android 2.2 onwards. As of Android 4.1, Google
has expanded Voice Actions with ability to talk back and read answers from Google's
Knowledge Graph when queried with specific commands. The ability to control hardware has
not yet been implemented.
Multi-touch
Android has native support for multi-touch which was initially made available in handsets
such as the HTC Hero. The feature was originally disabled at the kernel level (possibly to
avoid infringing Apple's patents on touch-screen technology at the time). Google has since
released an update for the Nexus One and the Motorola Droid which enables multi-touch
natively.
Multitasking
Screen capture
Android supports capturing a screenshot by pressing the power and home-screen buttons at
the same time. Prior to Android 4.0, the only methods of capturing a screenshot were through
manufacturer and third-party customizations (apps), or otherwise by using a PC connection
(DDMS developer's tool). These alternative methods are still available with the latest
Android.
TV recording
Video calling
Android does not support native video calling, but some handsets have a customized version
of the operating system that supports it, either via the UMTS network (like the Samsung
Galaxy S) or over IP. Video calling through Google Talk is available in Android 2.3.4
(Gingerbread) and later. Gingerbread allows Nexus S to place Internet calls with a SIP
account. This allows for enhanced VoIP dialing to other SIP accounts and even phone
numbers. Skype 2.1 offers video calling in Android 2.3, including front camera support.
Users with the Google+ Android app can perform video chat with other Google+ users
through Hangouts.
Accessibility
Android software development is the process by which applications are created for devices
running the Android operating system. Google states that Android apps can be written using
Kotlin, Java, and C++ languages using the Android software development kit (SDK), while
using other languages is also possible. All non-JVM languages, such as Go, JavaScript, C,
C++ or assembly, need the help of JVM language code, that may be supplied by tools, likely
with restricted API support.
The Android software development kit (SDK) includes a comprehensive set of development
tools. The Android SDK Platform Tools are a separately downloadable subset of the full
SDK, consisting of command-line tools such as ADB and fastboot. The Android Debug
Bridge (ADB) is a tool to run commands on a connected Android device. Fastboot is a
protocol used for flashing filesystems. Code written in C/C++ can be compiled to ARM, or
x86 native code (or their 64-bit variants) using the Android Native Development Kit (NDK).
Android SDK is incompatible with Java bytecode and runs on its own virtual machine,
optimized for low-memory devices such as smartphones and tablet computers. Depending on
the Android version, the bytecode is either interpreted by the Dalvik virtual machine or
compiled into native code by the Android Runtime.
We can create XML layouts in Android, and handle them using Java. Android XML layouts
are also part of a larger umbrella of Android files and components called resources.
Resources are the additional files and static content an application needs, such as animations,
color schemes, layouts, menu layouts.
Each layout file must contain one (and only one) root element. Linear Layouts, Relative
Layouts, and Frame Layouts (see Root Views section below) may all be root elements. Other
layouts may not be. All other XML elements will reside within this root object.
A View is simply an object from Android's built-in View class. It represents a rectangular
area of the screen, and is responsible for displaying information or content, and event
handling. Text, images, and buttons are all Views in Android.
1.5 Scope
It is developed using Android Studio. It has been implemented on Windows. The
application developed here provides an interface to interact with different activities at a time.
The keyboard is the main input devices. The application splash screen and many other main
activities which the user can interact with.
FUSE – Minigames:
FUSE, a ‘fuse’-ion of minigames , is a minigames app which consists of six minigames .The
six mini games are TapTorial , Tic Tap Toe , Tapman , Tap That Song , Simon Tap ,
Reaction Tap . We have developed an interactive user interface which users can play during
boredom hours.
Once the Splash Screen loads up with Fuse Logo , we enter the main page of the application.
We have enter to enter a username /gamertag ( or leave it as blank and you will registered as
anonymous player) , then we can click on the play icon.
On clicking the play icon, we enter the game catalogue , where the gamer can choose which
game he wishes to play . Highscores of the users in the respectively games will be maintained
along with the username/gamertag .We can go to the home screen of the application , on
clicking highscore logo , it will take you to the Scoreboard of various gamers and their
highscores in different games .
Chapter 2
LITERATURE SURVEY
Recent years have seen the rise of mobile users with PDAs, laptops and particularly mobile
phones. Worldwide there are over 2 billion mobile phone users [1] – roughly one third of the
world’s population. In South Africa alone there are 30 million mobile phone users [1] out of a
population of 47 million. This pervasiveness of mobile devices has created a substantial
market for mobile applications and games that continues to grow extremely rapidly.
With so many mobile devices, it is crucial for a developer to target the right mobile platform
and development environment, or a combination thereof. Portability across platforms will
ensure the maximum target audience is reached. This is specifically important for mobile
game development.
The mobile game industry has firmly asserted itself as a significant industry with major
development houses such as EA Mobile driving it forward. As such, it is possible to make
some observations about the mobile game industry. Primarily, we are developing a android
mobile game application. In addition to the nature of the game, user input and hardware
limitations also affect the success of a mobile game.
Java offers a collection of packages filled with in-built function, and widgets to develop
an Android application. The Java programming language requires the presence of a software
platform in order for compiled programs to be executed.
Oracle supplies the Java platform for use with Java. The Android SDK is an alternative
software platform, used primarily for developing Android applications with its own GUI
system.
Using Android's XML vocabulary, you can quickly design UI layouts and the screen
elements they contain. Each layout file must contain exactly one root element, which must be
a View or ViewGroup object. Once you've defined the root element, you can add additional
layout objects or widgets as child elements to gradually build a View hierarchy that defines
your layout. Android provides a straightforward XML vocabulary that corresponds to the View
classes and subclasses, such as those for widgets and layouts. You can also use Android Studio's
Layout Editor to build your XML layout using a drag-and-drop interface.
We have developed an interactive user interface of the minigames application which users
can play during boredom hours. Once the Splash Screen loads up with Fuse Logo , we enter
the main page of the application. We have enter to enter a username /gamertag ( or leave it as
blank and you will registered as anonymous player) , then we can click on the play icon.
On clicking the play icon, we enter the game catalogue , where the gamer can choose which
game he wishes to play . Highscores of the users in the respectively games will be maintained
Along with the username/gamertag .We can go to the home screen of the application , on
clicking highscore logo , it will take you to the Scoreboard of various gamers and their
highscores in different games .
Chapter 3
REQUIREMENT
3.1 User Requirements
64bit
Windows 7 and above
Intel i5 or above processor
8GB and above RAM
This application has been designed on Windows Platform and uses Android Studio
Chipmunk with JDK and SDK tools.
Development Platform
Windows 10 Home
Development Tool
Java
XML
SQLite database
Chapter 4
SOFTWARE DESIGN
4.1 Proposed System
To achieve the required layout and design, the in-built function is used on XML. It is
the section which provides the graphical interface. It is used to set the coloring, and
backgrounds. Java functions are used to handle the application.
4.2 Packages
import android.os.Bundle: A mapping from String keys to values of various types. In most
cases, you should work directly with either the Bundle or Persistable Bundle subclass.
import android.widget.EditText: A user interface element for entering and modifying text.
When you define an edit text widget, you must specify the R.styleable.TextView_inputType
attribute.
import android.util.Timer: Timer is a class in android which is used to perform some task
according to time period. Like countdown clock. Or we can call any function after some time
like after 2 minutes using timer class.
import android.util.log: Mock Log implementation for testing on non android host.
import android.view.View: This class represents the basic building block for user interface
components. A View occupies a rectangular area on the screen and is responsible for drawing
and event handling. View is the base class for widgets, which are used to create interactive UI
components (buttons, text fields, etc.). The ViewGroup subclass is the base class for layouts,
which are invisible containers that hold other Views (or other ViewGroups) and define their
layout properties.
import android.widget.Toast: A toast is a view containing a quick little message for the user.
The toast class helps you create and show those.
When the view is shown to the user, appears as a floating view over the application. It will
never receive focus. The user will probably be in the middle of typing something else. The
idea is to be as unobtrusive as possible, while still showing the user the information you want
them to see. Two examples are the volume control, and the brief message saying that your
settings have been saved. The easiest way to use this class is to call one of the static methods
that constructs everything you need and returns a new Toast object.
4.3 Interaction
A user interface element the user can tap or click to perform an action. The above snippet creates
an instance of View.OnClickListener and wires the listener to the button using
setOnClickListener(View.OnClickListener) . As a result, the system executes the code you
Animation rotateAnim;
EditText editText;
String username;
String currentUser;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
buttonToScore = findViewById(R.id.buttonScoreList);
editText=findViewById(R.id.userName);
img=findViewById(R.id.playButton);
img.setClickable(true);
rotateAnim = AnimationUtils.loadAnimation(this, R.anim.rotate);
createDB();
createTables();
buttonToScore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this, ViewScores.class));
}
});
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
username = editText.getText().toString();
if (username.equals("")) {
username = "Anonymous";
}
saveUser(username);
img.startAnimation(rotateAnim);
}
});
rotateAnim.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
startActivity(intent);
@Override
public void onAnimationRepeat(Animation animation) {
}
});
editor.putString(Constants.USERNAME_CURRENT, username);
editor.commit();
DBHelper.tappyDB.execSQL(setPRAGMAForeignKeysOn);
DBHelper.tappyDB.execSQL(createScoresTableCmd);
@Override
public void onBackPressed(){
Intent a = new Intent(Intent.ACTION_MAIN);
a.addCategory(Intent.CATEGORY_HOME);
a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(a);
}
}
Chapter 5
IMPLEMENTATION
5.1 Source Code
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="Enter Your GamerTag !"
android:textColor="@color/black"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.113" />
<ImageView
android:id="@+id/splashImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.497"
app:srcCompat="@drawable/fuse1" />
<EditText
android:id="@+id/userName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:ems="10"
android:fontFamily="casual"
android:hint=" Eg GamerTag : deathstroke-x10"
android:inputType="textPersonName"
android:textColor="@color/darkOrange"
android:textColorHint="@color/buttonHangMan"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<ImageButton
android:id="@+id/buttonScoreList"
android:layout_width="189dp"
android:layout_height="126dp"
android:background="@android:color/transparent"
android:scaleType="centerInside"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.861"
app:srcCompat="@drawable/topthree" />
<ImageView
android:id="@+id/playButton"
android:layout_width="247dp"
android:layout_height="144dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.854"
app:srcCompat="@drawable/videoplayer" />
</androidx.constraintlayout.widget.ConstraintLayout>
package com.example.sampleproject;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
import com.example.sampleproject.SupportClasses.Constants;
import com.example.sampleproject.SupportClasses.DBHelper;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
buttonToScore = findViewById(R.id.buttonScoreList);
editText=findViewById(R.id.userName);
img=findViewById(R.id.playButton);
img.setClickable(true);
rotateAnim = AnimationUtils.loadAnimation(this, R.anim.rotate);
createDB();
createTables();
buttonToScore.setOnClickListener(new View.OnClickListener() {
@Override
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
username = editText.getText().toString();
if (username.equals("")) {
username = "Anonymous";
}
saveUser(username);
img.startAnimation(rotateAnim);
}
});
rotateAnim.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
startActivity(intent);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
}
public void saveUser(String username)
{
SharedPreferences sharedPref =
PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
SharedPreferences.Editor editor = sharedPref.edit(); //editor needed to put content in
editor.putString(Constants.USERNAME_CURRENT, username);
editor.commit();
DBHelper.tappyDB.execSQL(setPRAGMAForeignKeysOn);
DBHelper.tappyDB.execSQL(createScoresTableCmd);
@Override
public void onBackPressed(){
Intent a = new Intent(Intent.ACTION_MAIN);
a.addCategory(Intent.CATEGORY_HOME);
a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(a);
}
Chapter 6
SNAPSHOT
Chapter 7
Introducing a difficulty level for playing against the CPU for a more challenging
experience.
REFERENCES
[1] Android Boot Camp for Developers Using Java®: A Guide to Creating Your First
Android Apps, 3rd Edition, by Corinne Hoisington
[2] Android official documentation: https://developer.android.com/docs
[3] Tic Tac Toe tutorial: https://www.youtube.com/watch?v=apDL78MFR3o
[4] Font: https://www.dafont.com/brushot.font
[5] Font: https://www.dafont.com/retro-computer.font
[6] Timer and TimerTask tutorial: https://www.youtube.com/watch?v=7QVr5SgpVog
[7] Graph tutorials: https://www.youtube.com/watch?v=VriiDn676PQ
[8] Hatchful logo creator: https://hatchful.shopify.com/
[9] All icons and images used are from are free to use
DECLARATION
We students of 6th semester BE, Computer Science and Engineering College hereby
declare that project work entitled “FUSE – mini games” has been carried out by us at
City Engineering College, Bangalore and submitted in partial fulfilment of the course
requirement for the award of the degree of Bachelor of Engineering in Computer
Science and Engineering of Vishvesvaraya Technological University, Belgaum,
during the academic year 2021-2022.
We also declare that, to the best of our knowledge and belief, the work reported here
does not form the part of dissertation on the basis of which degree or award was
conferred on a earlier occasion on this by any other student.
Date: 13/07/2022
Place: Bangalore