Final Report Submitted
Final Report Submitted
MAJOR PROJECT
ON
AMIT KASHYAP(16BCA1017)
SHANKIT KAPIL(16BCA1360)
MOONIB SARFARAZI(16BCA1031)
1
DECLARATION BY CANDIDATE
I, hereby, certify that this “Wi-Fi Based Mobile Quiz/Online Test(MCQ), is presented in
work carried out during a period from 05 JAN 2019 to 12 APRIL 2019 .The matter presented in
this report has not been submitted by any other University Institute for the award of Bachelors
of Computer Application.
ACKNOWLEDGEMENT
I take immense pleasure in thanking our H.O.D Mr. Kamaljeet Singh Saini for having
permitted me to carry out this project work.
I wish to express my deep sense of gratitude to our Guide …….……… for her able guidance
and useful suggestions, which helped us in completing the project work, in time.
Words are inadequate in offering our thanks for their encouragement and cooperation in carrying
out the project work.
Finally, yet importantly, we would like to express our heartfelt thanks our beloved parents or
their blessings, our friends & classmates for their help and wishes for the successful completion
of this project.
0
1
CONTENTS
Page
No.
1. Overview of project 1
2. Features and specification 2
3. Android Applications 5
4. Technology Used 6
5. Introduction to App 9
6. Software Requirement Specification Document 11
7. Test Cases 22
8. Code Implementation 24
9. Screenshot 30
10. Conclusion 33
11. Bibliography 34
Page |1
Overview
What is Android?
Operating Systems have developed a lot in last 15 years. Starting from black and white phones to
recent smart phones or mini computers, mobile OS has come far away. Especially for smart
phones, Mobile OS has greatly evolved from Palm OS in 1996 to Windows pocket PC in 2000
then to Blackberry OS and Android.
One of the most widely used mobile OS these days is ANDROID. Android is a software bunch
comprising
no only operating system but also middleware and key applications. Android Inc was founded in
Palo Alto of California, U.S. by Andy Rubin, Rich miner, Nick sears and Chris White in 2003.
Later Android Inc. was acquired by Google in 2005. After original release there have been
number of updates in the original version
of Android.
Page |2
Android comes with an Android market which is an online software store. It was developed by
Google. It allows Android users to select, and download applications developed by third party
developers and use them. There are around 2.0 lack+ games, application and widgets available
on the market for users.
Android applications are written in java programming language. Android is available as open
source for developers to develop applications which can be further used for selling in android
market. There are around 200000 applications developed for android with over 3 billion+
downloads. Android relies on Linux version 2.6 for core system services such as security,
memory management, process management, network stack, and driver model.
Page |3
For software development, Android provides Android SDK (Software development kit). Read
more about open source software.
Android is a powerful operating system competing with Apple 4GS and supports great
features. Few of them are listed below:
Feature Description
Android OS basic screen
Beautiful UI provides a beautiful and
intuitive user interface.
GSM/EDGE, IDEN, CDMA, EV-DO,
Connectivity UMTS,
Bluetooth, Wi-Fi, LTE, NFC and
WiMAX.
Android Applications
Android applications are usually developed in the Java language using the Android Software
Development Kit. Once developed, Android applications can be packaged easily and sold out
either through a store such as Google Play or the Amazon Appstore. Android powers hundreds
of millions of mobile devices in more than 190 countries around the world. It's the largest
installed base of any mobile platform and growing fast. Every day more than 1 million new
Android devices are activated worldwide. This tutorial has been written with an aim to teach
you how to develop and package Android application. We will start from environment setup for
Android application programming and then drill down to look into various aspects of Android
applications.
Page |6
TECHNOLOGY USED:-
Android software development kit
The Android software development kit (SDK) includes a comprehensive set of development
tools. These include a debugger, libraries, a handset emulator based on QEMU, documentation,
sample code, and tutorials. Currently supported development platforms include computers
running Linux, Mac OS X 10.5.8 or later, and Windows XP or later. As of March 2015, the SDK
is not available on Android itself, but the software development is possible by using specialized
Android applications.
Android Studio, [9] made by Google and powered by IntelliJ, is the official IDE; however,
developers are free to use others. Additionally, developers may use any text editor to edit Java
and XML files, then use command line tools ( Java Development Kit and Apache Ant are
required) to create, build and debug Android applications as well as control attached Android
devices (e.g., triggering a reboot, installing software package(s) remotely).
javac- all your source code written in Java needs to be compiled before it can be converted
to the DEX format.
Once your code has been compiled, dexed, and packaged into an APK, we need jar signer to
sign the APK.
There are some efforts out there to bring Java 8 features to Android, most notably gradle-
It was announced on May 16, 2013 at the Google I/O conference. Android Studio is freely available
under the Apache License 2.0 .
Android Studio was in early access preview stage starting from version 0.1 in May 2013, then
entered beta stage starting from version 0.8 which was released in June 2014.
The first stable build was released in December 2014, starting from version 1.0.
Based on JetBrains' IntelliJ IDEA software, Android Studio is designed specifically for Android
development. It is available for download on Windows , Mac OS X and Linux ,
and replaced Eclipse Android Development Tools (ADT) as Google's primary IDE for native
Android application development.
Page |8
Although Eclipse is not the only Java development environment that can be used to develop
Android applications, it is by far the most popular. This is partially due to its cost (free!) but
mostly due the strong integration of the Android tools with Eclipse. This integration is achieved
with the Android Development Tools (ADT) plug-in for Eclipse, which can be downloaded from
the Android website.
This tool serves a number of important functions. It manages the different versions of the Android
SDKs (build targets) that you can develop for, as well as third-party add- ons, tools, devices
drivers, and documentation. Its second function is to manage the Android Virtual Device
configurations (AVDs) you use to configure emulator instances.
The Android Debug Bridge (ADB) connects other tools with the emulator and devices. Besides
being critical for the other tools (most especially the Eclipse ADT plug-in) to function, you can
use it yourself from the command line to upload and download files, install and uninstall
packages, and access many other features via the shell on the device or emulator.
Page |9
Introduction to App
Our project is on android Application name ‘Wi-Fi Based Mobile
Quiz/Online Test(MCQ).
System specification
Mobile Version : Android 4.0 or upper versions
8GB RAM
500 GB SSD
P a g e | 11
SOFTWARE RESOURCE
REQUIRMENT DOCUMENT
Introduction
Relevance:
Problem Definition:
Objective:
Table of Comparison :
consuming consuming
Database Required Not required
Less More
Comparison of Existing System & Proposed System
Software Requirements:
Database: SQLite
Hardware Requirements:
DATA DICTIONARY
Id Integer Primary
key,autoIncrement
Diagram:
A DFD shows what kind of information will be input to and output from the
system, where the data will come from and go to, and where the data will
be stored. It does not show information about the timing of process or
information about whether processes will operate in sequence or in
parallel.
Level 0 DFD:
P a g e | 18
Entity-Relationship Diagram:
P a g e | 20
Table Diagram:
Form Design:
Components-
▪ TextView(Medium)
▪ EditText
▪ Button
▪ CheckBox
▪ ListVie
▪ Spinner
▪ ImageView
▪ AlertDialog
SQL JOINS
The SQL Joins clause is used to combine records from two or more tables
in a database. A JOIN is a means for combining fields from two tables by
using values common to each.
+----+----------+-----+-----------+
| ID | USER NAME| AGE | PASSWORD |
+----+----------+-----+-----------+
| 1 | Ramesh | 32 | Ahmedabad |
| 2 | Khilan | 25 | Delhi |
| 3 | kaushik | 23 | Kota |
P a g e | 22
| 4 | Chaitali | 25 | Mumbai |
| 5 | Hardik | 27 | Bhopal |
| 6 | Komal | 22 | MP |
| 7 | Muffy | 24 | Indore |
+----+----------+-----+-----------+
Now, let us join these two tables in our SELECT statement as shown
below.
+----+----------+-----+
| ID | NAME | AGE |
+----+----------+-----+
| 3 | kaushik | 23 |
| 2 | Khilan | 25 |
| 4 | Chaitali | 25 |
+----+----------+-----+
!=, BETWEEN, LIKE, and NOT; they can all be used to join tables. However,
the most common operator is the equal to symbol.
. Code Implementation
MainActivity.java
package com.example.suhanshu.kvz;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.example.suhanshu.kvz.BroadcastReceiver.AlarmReceiver;
import com.example.suhanshu.kvz.Model.User;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.rengwuxian.materialedittext.MaterialEditText;
import java.util.Calendar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnSignIn = findViewById(R.id.sign_in);
btnSignUp = findViewById(R.id.sign_up);
editUser = findViewById(R.id.Username);
editPassword = findViewById(R.id.password);
users = FirebaseDatabase.getInstance().getReference("Users");
btnSignUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showDialog();
}
});
registerAlarm();
btnSignIn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
users.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
P a g e | 25
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
});
am.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),AlarmManager.INTERV
AL_DAY,pendingIntent);
}
users.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
if (dataSnapshot.child(user.getUserName()).exists()) {
Toast.makeText(MainActivity.this, "User Already Exist",
Toast.LENGTH_SHORT).show();
} else {
users.child(user.getUserName())
.setValue(user);
Toast.makeText(MainActivity.this, "Registration
Successfully", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
dialog.dismiss();
}
});
alertdialog.show();
}
}
Start.java
package com.example.suhanshu.kvz;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.example.suhanshu.kvz.Model.Question;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.Collections;
Button btnPlay;
FirebaseDatabase database;
DatabaseReference questions;
P a g e | 27
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start);
database = FirebaseDatabase.getInstance();
questions = database.getReference("Questions");
loadQuestion(Common.CategoryId);
btnPlay = findViewById(R.id.btnPlay);
btnPlay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Start.this, Playing.class);
startActivity(intent);
finish();
}
});
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
Collections.shuffle(Common.list_question);
}
}
MainActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/wall1"
tools:context=".MainActivity">
<ImageView
android:layout_width="159dp"
android:layout_height="116dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
P a g e | 28
android:layout_marginTop="8dp"
android:src="@drawable/logo"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/sign_in"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="52dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/sign_in"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.805"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.845" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@android:color/white"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/Username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:hint="@string/user_name"
android:padding="5dp"
android:textColor="@color/colorPrimary"
android:textColorHint="@color/colorPrimary"
android:textSize="24sp"
app:met_baseColor="@color/colorPrimary"
app:met_floatingLabel="highlight"
app:met_primaryColor="@color/colorPrimary"
app:met_singleLineEllipsis="true" />
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:hint="@string/password"
P a g e | 29
android:padding="5dp"
android:textColor="@color/colorPrimary"
android:textColorHint="@color/colorPrimary"
android:textSize="24sp"
app:met_baseColor="@color/colorPrimary"
app:met_floatingLabel="highlight"
app:met_primaryColor="@color/colorPrimary"
app:met_singleLineEllipsis="true" />
</LinearLayout>
<Button
android:id="@+id/sign_up"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="52dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/sign_up"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.153"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.844" />
</android.support.constraint.ConstraintLayout>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.suhanshu.kvz">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<service android:name=".Services.MyFirebaseIdService">
<intent-filter>
P a g e | 30
</manifest>
Screenshots
P a g e | 31
P a g e | 32
P a g e | 33
Conclusion
Bibliography
www.google.com
www.stackoverflow.com
www.scripbd.com
www.slideshare.com
www.devloper.android.com
https://www.javatpoint.com/java-mail-api-tutorial
https://stacktips.com/tutorials/android/speech-to-text-in-android