Sunteți pe pagina 1din 69

CERTIFICATE

This is to certify that the project report entitled “CHAT APPLICATION USING FIREBASE

WITH AES ENCRYPTION” submitted by Neha Srivastava , Ayushi Shukla , Renuka Pandey ,

Uma Shree to Feroze Gandhi Institute of Engineering and Technology, Raebareli in partial

fulfillment for the award of Degree of Bachelor of Technology in Computer Science and Engineering

is a bonafide record of the project work carried out by him under my supervision during the year

2016-2017.

Name: Dinesh
Kumar Tiwari
Prof. N. Raman Namboothiri (Project
Professor and Head Guide)
Department of Mechanical Engineering Designation

FEROZE GANDHI INSTITUTE OF ENGINEERING AND


TECHNOLOGY
KOTHAMANGALAM 686 666

KERALA, INDIA.
DECLARATION

This is to certify that Report entitled ”CHAT APPLICATION USING FIREBASE


WITH AES ENCRYPTION” which is submitted by us in partial fulfillment of the
requirement for the award of degree B.Tech. in Computer Sc. & Engineering to
F.G.I.E.T Raebareli, Dr. A. P. J. Abdul Kalam Technical University, Uttar Pradesh
Lucknow comprises only our own work and due acknowledgement has been made
in the text to all other material used.

Ayushi Shukla (1318710030)


Neha Srivastava (1318710058)
Renuka Pandey(1318710079)
Uma Shree (1318710118)
ACKNOWLEDGEMENT
I take this opportunity to express my profound gratitude and deepest regards to my
guide Mr. Dinesh Tiwari for his exemplary guidance, monitoring and constant
encouragement throughout the course of this project. The blessing, help and
guidance given by her time to time shall carry me a long way in the journey of life
on which I am about to embark.
I also take this opportunity to express a deep sense of gratitude to CSE
Department FGIET, Rae Bareli for their cordial support, valuable information
and guidance, which helped me in completing this task through various stages.
I am obliged to staff members of CSE Department FGIET, for the valuable
information provided by them in their respective fields. I am grateful for their
cooperation during the period of my assignment. I would like to express my special
gratitude and thanks to them for giving me such attention and time
My thanks and appreciations also go to my colleague in developing the project and
people who have willingly helped me out with their abilities.

Ayushi Shukla (1318710030)


Neha Srivastava (1318710058)
Renuka Pandey(1318710079)
Uma Shree (1318710118)
ABSTRACT
Chatmate is an android application which basically provides group communication
facility. This project is to create the chat application with a sever and clients where
server side coding is not needed to enable the clients to chat with many other
clients in the same common chat group. This project is to simulate the multicast
chatting. The main purpose of this project is to provide multi-chatting functionality
through network. This project can play an important role in organizational field as
well as a social field where employs and social user can connect together through
LAN.
We have used firebase in our project which is a mobile and web application
development platform. It is made up of complementary features that developers
can mix and match to fit their needs. Firebase real-time database is used which
provides an API that allows developers to store and sync data across multiple
clients in real time
The secure communication between the person sending the information and the
person receiving the information is authenticated by using the Firebase
Authentication.
qtThe main functionality of this project is that we have used AES encryption to
secure the messages over database. We have used this encryption because no
cryptanalytic attack has been recorded against it till date. AES is a symmetric
block cipher choosen by the US Government to protect classified information and
is implemented in software and hardware throughout the world to encrypt sensitive
data. AES uses 10 rounds for 128 bit keys, 12 rounds for 192 bit keys and 14
rounds for 256 bit keys. AES is more secure than its predecessors DES and triple
DES, making it ideal for software application firmware and hardware that require
either low latency or high throughput.
CONTENTS
Title Page No.

DECLARATION
ACKNOWLEDGEMENT
ABSTRACT
LIST OF FIGURES
1. INTRODUCTION
1.1 About Project
1.2 Android: An open Platform
1.3 Android Versions
1.4 Features of Android
1.5 Why develop for Android
1.6 Life cycle of Android activity
1.7 Scope of investigation
1.8 Problem definition
2. LITERATURE
2.1. Android Software Stack
2.2 Android Application Architecture
2.2.1 Android Libraries
2.3 Developing for android
2.3.1 Downloading & installing SDK
2.3.2 Android Studio
2.3.3 Features of android studio
2.3.4 System Requirements
2.4 Android development tools
2.4.1 Android Emulator
2.4.2 Android SDK manager
2.4.3 Android application components
2.5 Fundamental android UI design
2.6 Android widget toolbox
2.7 Introducing Intents
2.7.1 Launching activities using Intents
2.7.2 Intents to broadcast events
2.8 Introducing fragments
2.9 Creating Content Provider
2.10 Introducing Firebase
2.10.1 Features
2.10.2 Real-time database
2.10.3 Authentication
2.10.4 Cloud Storage
2.10.5 Miscellaneous features
2.11 Advanced Encryption Standard
2.11.1 Why AES
2.11.2 Features and Functionality
2.11.3 AES Analysis
3. PROPOSED SYSTEM
3.1 System Analysis
3.2 Feasibility Study
3.2.1 Technical feasibility
3.2.2 Economic feasibility
3.2.3 Behavioural study
3.2.4 Cost analysis

4. REQUIREMENT ANALYSIS AND SPECIFICATION(SRS)

4.1 Requirement analysis


4.1.1 Interface requirement text
4.2 Requirements
4.2.1 Memory requirements
4.2.2 Minimum hardware requirements
4.2.3 Minimum software requirements
4.3 Functional requirements
4.4 Non functional requirements
4.5 Software requirements specifications
4.5.1 Advantages of srs
4.5.2 Characteristics of srs
4.6 System quality attributes

5. DESIGN DOCUMENTS

5.1 System design


5.2 Data flow diagrams
5.2.1 level 0 dfd text
5.2.2 level 4 dfd
5.3 Activity diagram
5.4 Use case diagram

6. IMPEMENTATION
6.1 Authentication Process
6.2 Database Description
6.3 Encryption Description
6.4 Realtime Storage

6. DEFINITION OF TESTING

6.1.1 Functional Testing


6.1.2 Non Functional Testing
LEVEL OF TESTING
6.2.1 Unit Testing
6.2.2 System Testing
6.2.3 Integration Testing
6.2.4 Acceptance Testing
7. SNAPSHOTS
8. CONCLUSIONS
9. FUTURE SCOPE
10. REFERENCES

1.1. About Project

This report documents the process of designing, building and testing an android
application for the use of students for supplementing their knowledge about
scientists in an engaging way.
The project is an android quiz application which is built around the concept of
content gamification as this makes learning an engaging process thus proving to
be a better learning tool. Here we use images of scientists which students
generally encounter in their textbooks. So this application can also be used by
teachers to a replacement of bland written quizzes but only the initial levels.
The more advanced levels are for grownups and young inquisitive minds to put
their grey matter to test.
The project is built using android studio a tool for application development for
android platform provided by Google. It incorporates moderate coding as the
application is quite small in comparison to other trivia applications available in
the play store. There is extensive use of images and sound effects in the
application.
The application has various levels to offer with varying degree of hardness
and specific nature. Except one all levels in the application are initially locked
and a specific number of correct answers keep opening new levels. The first
one being a very basic one and features scientists which every middle school
student has heard about. The levels have been designed keep in mind school
students as well as the grownups. Each question comes with a picture of a
famous scientist and to make things even simpler options are also provided for
answering the questions. Besides hints are also provided in case of a wrong
answer and a short biography about the scientist is provided in case of a correct
answer. All questions are pictorial in nature and come with four options to
select the correct answer.
Summing this up we can say this is one small application for people of every
age group but mainly targeted for the school students. This software can find
application as a supplement of classes with growing use of technology in
classrooms while for some inquisitive minds it will be just another trivia
application to quench their insatiable thirst for knowledge.
1.2. Android: An open platform for mobile development
Android is a mobile operating system that is based on a modified version of
Linux. It was originally developed by a startup of the same name, Android, Inc.
In 2005, as part of its strategy to enter the mobile space, Google purchased
Android and took over its development work.
Google wanted Android to be open and free; hence, most of the Android code
was released under the open source Apache License, which means that anyone
who wants to use Android can do so by downloading the full Android source
code. Moreover, vendors (typically hardware manufacturers) can add their own
proprietary extensions to Android and customize Android to differentiate their
products from others.
The simple development model makes Android very attractive and has thus
piqued the interest of many vendors. This has been especially true for
companies affected by the phenomenon of Application iPhone, a hugely
successful product that revolutionized the smartphone industry. Such companies
include Motorola and Sony Ericsson, which for many years have been
developing their own mobile operating systems. When the iPhone was
launched, many of these manufacturers had to scramble to find new ways of
revitalizing their products. These manufacturers see Android as a solution -they
will continue to design their own hardware and use Android as the operating
system that powers it.
The main advantage of adopting Android is that it offers a unified approach to
application development. Developers need only develop for Android, and their
applications should be able to run on numerous different devices, as long as the
devices are powered using Android.
In the world of smartphones, applications are the most important part of the
success chain. Device manufacturers therefore see Android as their best hope to
challenge the onslaught of the iPhone, which already commands a large base of
applications.

Android Versions
A pictorial representation of android versions-

Fig. 1.1: Android Versions [source: http://developer.android.com/sdk/installing/studio.html]

1.4. Features of Android


Because Android is open source and freely available to manufacturers for
customization, there are no fixed hardware or software configurations.
However, Android itself supports the following features:
Storage— Uses SQLite, a lightweight relational database, for data
storage.
Connectivity— Supports GSM IDEN, CDMA,EV-DO,UMTS, Bluetooth
(includes A2DP and AVRCP), Wi-Fi, LTE, and Wi-MAX.
Messaging — Supports both SMS and MMS.
Web browser — Based on the open source Web Kit, together with
Chrome’s V8 JavaScript engine
Media support — Includes support for the following media: H.263,
H.264 (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP
container), AAC, HE-AAC (in MP4 or 3GP container), MP3,
MIDI , Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP.
Hardware support — Accelerometer Sensor, Camera, Digital Compass,
Proximity Sensor and GPS
Multi-touch — Supports multi-touch screens.
Multi-tasking — Supports multi-tasking applications
Flash support — Android 2.3 supports Flash 10.1.
Tethering — Supports sharing of Internet connections as a
wired/wireless hotspot
Many of the features listed such as 3D graphics and native database support, are
also available in other native mobile SDKs, as well as becoming available on
mobile browsers. The pace of innovation in mobile platforms, both Android and
its competitors, makes an accurate comparison of the available features difficult.
The Above following non comprehensive list details some of the features
available on Android that may not be available on all modern mobile
development platforms: Google Maps applications — Google Maps for Mobile
has been hugely popular, and Android offers a Google Map as an atomic,
reusable control for use in your applications.
The Map View lets you display, manipulate, and annotate a Google Map
within your Activities to build map-based applications using the familiar
Google Maps interface. Background services and applications — Full support
for background applications and services lets you create applications based on
an event-driven model, working silently while other applications are being used
or while your mobile sits ignored until it rings, flashes, or vibrates to get your
attention. Maybe it’s a streaming music player, an application that tracks the
stock market, alerting you to significant changes in your portfolio, or a service
that changes your ringtone or volume depending on your current location, the
time of day, and the identity of the caller. Android provides the same
opportunities for all applications and developers.
1.5. Why Develop for Android?
Shared data and inter-process communication — Using Intents and Content
Providers, Android lets your applications exchange messages, perform
processing, and share data. You can also use these mechanisms to leverage the
data and functionality provided by the native Android applications. To mitigate
the risks of such an open strategy, each application’s process, data storage, and
5
files are private unless explicitly shared with other applications via a full
permission-based security mechanism. All applications are created equal.
Android doesn’t differentiate between native applications and those developed
by third parties. This gives consumers unprecedented power to change the look
and feel of their devices by letting them completely replace every native
application with a third-party alternative that has access to the same underlying
data and hardware. Wi-Fi Direct and Android Beam — Using these innovative
new inter-device communication APIs, you can include features such as instant
media sharing and streaming. Android Beam is an NFC-based API that lets you
provide support for proximity-based interaction, while Wi-Fi Direct offers a
wider range peer-to-peer for reliable, high-speed communication between
devices.
Home-screen Widgets, Live Wallpaper, and the quick search box — Using
Widgets and Live Wallpaper, you can create windows into your application
from the phone’s home screen. The quick search box lets you integrate search
results from your application directly into the phone’s search functionality.
1.6. Life cycle of android activity
During its lifetime, each activity of an Android program can be in one of several
states. We, the developer, do not have control over what state our program is in.
That’s all managed by the system. However, we do get notified when the state is
about to change through the onXX() method calls.
We override these methods in our Activity class, and Android will call them at
the appropriate time:
onCreate(Bundle): This is called when the activity first starts up. We
can use it to perform one-time initialization such as creating the user
interface. OnCreate( ) takes one parameter that is either null or some state
information previously saved by the onSavedInstanceState( ) method.
onStart( ): This indicates the activity is about to be displayed to the user.
onResume( ): This is called when our activity can start interacting with
the user. This is a good place to start animations and music.
onPause( ): This runs when the activity is about to go into the
background, usually because another activity has been launched in front
of it. This is where we should save our program’s persistent state, such as
a database record being edited.
onStop( ): This is called when our activity is no longer visible to the user
and it won’t be needed for a while. If memory is tight, onStop( ) may
never be called (the system may simply terminate your process).
Fig. 1.2. Life cycle of android activity [source: The Android Developer’s Cookbook by
James Steele Nelson]

1.7. Scope of investigation


The aim of this project is to design, such an application that can help us to make
learning engaging and a fun process. The target audience of the project
incorporates school students where the application can supplement their
knowledge in an interesting way. This application can also be used by grownups
to test their knowledge about these famous scientists.
This can also be food for thought for the inquisitive minds. Overall the target
audience includes a multitude of people thus leading to various levels of varying
difficulty and specializations. In order to have something for everyone we
thought of dividing the levels into very famous ones and then branching out to
various specializations such as chemists and biologists. Thus this application
can also be a awareness check by a particular student of that specialization.
1.8. Problem Definition
The problem with this application is that the quiz application being developed is
that it has difficulty in compatibility .The major work to be done is to make the
application compatible for mobile devices using different versions of android as
some versions are nearly obsolete now. The main task at hand is to the content
gamification of a subject of study by use of modern day technology so that
students find learning interesting.

CHAPTER 2
LITERATURE
Android is an Operating System for mobile devices developed by Google,
which is built upon Linux Kernel. Android applications are written on JAVA
programming language. The Android SDK tools compile the code along with
any data and resource file into an APK file. The APK file contains all the
contents of an android application and is the file that Android-powered devices
use to install the application.
Android was described by Andy Rubin as follows:
“The first truly open and comprehensive platform for mobile devices. It
includes an Operating System, user-interface and application-all of the software
to run a mobile phone but without the proprietary obstacle that have hindered
mobile innovation.”
2.1. Android Software Stack
The Android software stack is, put simply, a Linux kernel and a collection of
C/C++ libraries exposed through an application framework that provides
services for, and management of, the run time and applications.
Linux kernel — Core services (including hardware drivers, process and
memory management, security, network, and power management) are
handled by a Linux 2.6 kernel. The kernel also provides an abstraction
layer between the hardware and the remainder of the stack.
Libraries — Running on top of the kernel, Android includes various
C/C++ core libraries such as libc and SSL, as well as the following:
A media library for playback of audio and video media
A surface manager to provide display management
Graphics libraries that include SGL and OpenGL for 2D and 3D
graphics.

SQLite for native database support


SSL and WebKit for integrated web browser and Internet
security
Android run time — The run time is what makes an Android phone an
Android phone rather than a mobile Linux implementation. Including the
core libraries and the Dalvik VM, the Android run time is the engine that
powers your applications and, along with the libraries, forms the basis for
the application framework.
Core libraries — Although most Android application development is
written using the Java language, Dalvik is not a Java VM. The core
Android libraries provide most of the functionality available in the core
Java libraries, as well as the Android specific libraries.
Dalvik VM — Dalvik is a register-based Virtual Machine that’s been
optimized to ensure that a device can run multiple instances efficiently. It
relies on the Linux kernel for threading and low-level memory
management.
Application framework — The application framework provides the
classes used to create Android applications. It also provides a generic
abstraction for hardware access and manages the user interface and
application resources.
Application layer — All applications, both native and third-party, are
built on the application layer by means of the same API libraries. The
application layer runs within the Android run time, using the classes and
services made available from the application framework.
Fig. 2.1. Android Application Layer
[source:http://developer.android.com/guide/developing/tools/index.html]

2.2. Android Application Architecture


Android’s architecture encourages component reuse, enabling you to publish
and share Activities, Services, and data with other applications, with access
managed by the security restrictions you define. The same mechanism that
enables you to produce a replacement contact manager or phone dialer can let
you expose your application’s components in order to let other developers build
on them by creating new UI front ends or functionality extensions.
The following application services are the architectural cornerstones of all
Android applications, providing the framework we have used for our own
software:
Fig. 2.2. Application Architecture [Source: http://www.tutorialspoint.com]

Activity Manager and Fragment Manager — Control the lifecycle of


your Activities and Fragments, respectively, including management of the
Activity stack.
Views — Used to construct the user interfaces for your Activities and
Fragments.
Notification Manager — Provides a consistent and nonintrusive
mechanism for signaling your users.
Content Providers — Lets your applications share data
Resource Manager — Enables non-code resources, such as strings and
graphics, to be externalized.
Intents — Provides a mechanism for transferring data between
applications and their components.
2.2.1. Android Libraries
Android offers a number of APIs for developing your applications. Rather than
list them all here, check out the documentation at resource [1], which gives a
complete list of packages included in the Android SDK. Android is intended to
target a wide range of mobile hardware, so be aware that the suitability and
implementation of some of the advanced or optional APIs may vary depending
on the host device.
2.3. Developing for Android
The Android SDK includes all the tools and APIs you need to write compelling
and powerful mobile applications. The biggest challenge with Android, as with
any new development toolkit, is learning the features and limitations of its APIs.
If you have experience in Java development, you’ll find that the techniques,
syntax, and grammar you’ve been using will translate directly into Android,
although some of the specific optimization techniques may seem
counterintuitive.
If you don’t have experience with Java but have used other object-oriented
languages (such as C#), you should find the transition straight forward. The
power of Android comes from its APIs, not the language being used, so being
unfamiliar with some of the Java-specific classes won’t be a big disadvantage.
2.3.1. Downloading and Installing the Android SDK
There is no cost to download or use the API, and Google does not require your
application to pass a review to distribute your finished programs on the Google
Play Store. Although the Google Play Store requires a small one-time fee to
publish applications, if you chose not to distribute via the Google Play Store,
you can do so at no cost.
You can download the latest version of the SDK starter package for your
chosen development platform from the Android development home page at
resource [2].
The starter package is a ZIP file that contains the latest version of the Android
tools required to download the rest of the Android SDK packages. Install it by
unzipping the SDK into a new folder. Take note of this location, as you’ll need
it later.
If you are developing from a Windows platform, an executable Windows
installer is available (and recommended) as an alternative to the ZIP file for
installing the platform tools. Before you can begin development, you need to
download at least one SDK platform release. You can do this on Windows by
running the SDK Manager.exe executable, or on Mac OS or Linux by running
the android executable in the tools subfolder of the starter package download.
You can expand each platform release node to see a list of the packages
included within it, including the tools, documentation, and sample code
packages.
To get started, simply check the boxes corresponding to the newest framework
SDK and the latest version of the tools, compatibility/support library,
documentation, and sample code.
2.3.2. Project development using Android Studio
Android Studio is an integrated development environment (IDE) for developing
on the Android platform. It was announced on May 16, 2013 at the Google I/O
conference by Google's Product Manager, Ellie Powers.
Android Studio is freely available under the Apache License 2.0 resource [3].
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 resource[4].
The first stable build was released in December 2014, starting from version
1.0 resource [3] based on JetBrains' IntelliJ IDEA software, Android Studio is
designed specifically for Android development resource[6]. It is available for
download on Windows, Mac OS X and Linux, resource[8] and replaced Eclipse
Android Development Tools (ADT) as Google's primary IDE for native
Android application development.
2.3.3. Features of Android Studio
New features are expected to be rolled out with each release of Android Studio.
The following features are provided in the current version:
Live Layout: WYSIWYG Editor Live Coding Realtime Application
Rendering.
Gradle-based build support.
Android-specific refactoring and quick fixes.
Lint tools to catch performance, usability, version compatibility and other
problems.
ProGuard and app-signing capabilities.
Template-based wizards to create common Android designs and
components.
A rich layout editor that allows users to drag-and-drop UI components,
option to preview layouts on multiple screen configurations.
Support for building Android Wear applications.
Built-in support for Google Cloud Platform, enabling integration with
Google Cloud Messaging and Application Engine.
2.3.4. System Requirements
Table no. 2.1. Android Studio
2.4. Android Development Tools
The Android SDK includes several tools and utilities to help to create, test, and
debug our projects. For additional details, check out the Android documentation
at resource [9]. As mentioned earlier, the ADT plug-in conveniently
incorporates many of these tools into the Eclipse IDE, where you can access
them from the DDMS perspective, including the following:
The Android Virtual Device and SDK Managers — Used to create and
manage AVDs and to download SDK packages, respectively. The AVD
hosts an Emulator running a particular build of Android, letting you
specify the supported SDK version, screen resolution, amount of SD card
storage available, and available hardware capabilities (such as
touchscreens and GPS).
The Android Emulator — An implementation of the Android VM
designed to run within an AVD on your development computer. Use the
Emulator to test and debug your Android applications.
Dalvik Debug Monitoring Service (DDMS) — Use the DDMS to
monitor and control the Emulators on which you’re debugging your
applications’
Android Debug Bridge (ADB) — A client-server application that
provides a link to virtual and physical devices. It lets you copy files,
install compiled application packages (APK), and run shell commands.
Logcat — A utility used to view and filter the output of the Android
logging system.
Android Asset Packaging Tool (AAPT) — Constructs the distributable
Android package files (APK).
The following additional tools are also available:
SQLite3 — A database tool that you can use to access the SQLite
database files created and used by Android.
Traceview — Graphical analysis tools for viewing the trace logs from
your Android application.
Hprof-conv — A tool that converts HPROF profiling output files into a
standard format to view in your preferred profiling tool.
MkSDCard — Creates an SD card disk image that can be used by the
Emulator to simulate an external storage card.
Dex — Converts Java .class bytecode into Android .dex bytecode.
Hierarchy Viewer — Provides both a visual representation of a layout’s
View hierarchy to debug and optimize your UI, and a magnified display
to get your layouts pixel-perfect.
Lint — A tool that analyzes your application and its resources to suggest
improvements and optimizations.
Draw9patch: A handy utility to simplify the creation of NinePatch
graphics.
Monkey and Monkey Runner: Monkey runs within the VM, generating
pseudo-random user and system events. Monkey Runner provides an API
for writing programs to control the VM from outside your application.
ProGuard — A tool to shrink and obfuscate your code by replacing
class, variable, and method names with semantically meaningless
alternatives. This is useful to make your code more difficult to reverse
engineer.
2.4.1. The Android Emulator
The Emulator is available for testing and debugging your applications. The
Emulator is an implementation of the Dalvik VM, making it as valid a platform
for running Android applications as any Android phone. Because it’s decoupled
from any particular hardware, it’s an excellent baseline to use for testing your
applications.
Full network connectivity is provided along with the ability to tweak the
Internet connection speed and latency while debugging your applications. You
can also simulate placing and receiving voice calls and SMS messages.

The ADT plug-in integrates the Emulator into Eclipse so that it’s launched
automatically within the selected AVD when you run or debug your projects. If
you aren’t using the plug-in or want to use the Emulator outside of Eclipse, you
can telnet into the Emulator and control it from its console. For more details on
controlling the Emulator, check out the documentation at resource.
18
To execute the Emulator, you first need to create a virtual device, as described
in the previous section. The Emulator will launch the virtual device and run a
Dalvik instance within it.
2.4.2. Android SDK Manager
The Android SDK Manager can be used to see which version of the SDK you
have installed and to install new SDKs when they are released. Each platform
release is displayed, along with the platform tools and a number of additional
support packages. Each platform release includes the SDK platform,
documentation, tools, and examples corresponding to that release.
2.4.3. Android Application Components
Android applications consist of loosely coupled components, bound by the
application manifest that describes each component and how they interact. The
manifest is also used to specify the application’s metadata, its hardware and
platform requirements, external libraries, and required permissions.
The following components comprise the building blocks for all your Android
applications:
Activities — Your application’s presentation layer. The UI of your
application is built around one or more extensions of the Activity class.
Activities use Fragments and Views to layout and display information,
and to respond to user actions. Compared to desktop development,
Activities are equivalent to Forms.
Services — The invisible workers of your application. Service
components run without a UI updating your data sources and Activities,
triggering Notifications, and broadcasting Intents. They’re used to
perform long running tasks, or those that require no user interaction (such
as network lookups or tasks that need to continue even when your
application’s Activities aren’t active or visible.)
19
Content Providers — Shareable persistent data storage. Content
Providers manage and persist application data and typically interact with
SQL databases. They’re also the preferred means to share data across
application boundaries. You can configure your application’s Content
Providers to allow access from other applications, and you can access the
Content Providers exposed by others. Android devices include several
native Content Providers that expose useful databases such as the media
store and contacts.
Intents — A powerful inter application message-passing framework.
Intents are used extensively throughout Android. You can use Intents to
start and stop Activities and Services, to broadcast messages system-wide
or to an explicit Activity, Service, or Broadcast Receiver, or to request an
action be performed on a particular piece of data.
Broadcast Receivers — Intent listeners. Broadcast Receivers enable
your application to listen for Intents that match the criteria you specify.
Broadcast Receivers start your application to react to any received Intent,
making them perfect for creating event-driven applications.
Widgets — Visual application components that are typically added to
the device home screen. A special variation of a Broadcast Receiver,
widgets enable you to create dynamic, interactive application components
for users to embed on their home screens.
Notifications — Notifications enable you to alert users to application
events without stealing focus or interrupting their current Activity.
They’re the preferred technique for getting a user’s attention when your
application is not visible or active, particularly from within a Service or
Broadcast Receiver. For example, when a device receives a text message
or an email, the messaging and Gmail applications use Notifications to
alert you by flashing lights, playing sounds, displaying icons, and
scrolling a text summary.
20
2.5. Fundamental Android UI Design
User interface (UI) design, User experience (UX), Human Computer Interaction
(HCI), and usability are huge topics that can’t be covered in the depth.
Nonetheless, the importance of creating a UI that your users will understand and
enjoy using can’t be overstated.
Android introduces some new terminology for familiar programming metaphors
that will be explored in detail in the following sections:
Views — Views are the base class for all visual interface elements
(commonly known as controls or widgets). All UI controls, including the
layout classes, are derived from View.
View Groups — View Groups are extensions of the View class that can
contain multiple child Views. Extend the View Group class to create
compound controls made up of interconnected child Views. The View
Group class is also extended to provide the Layout Managers that help
you lay out controls within your Activities.
Fragments — Fragments, introduced in Android 3.0 (API level 11), are
used to encapsulate portions of your UI. This encapsulation makes
Fragments particularly useful when optimizing your UI layouts for
different screen sizes and creating reusable UI elements. Each Fragment
includes its own UI layout and receives the related input events but is
tightly bound to the Activity into which each must be embedded.
Fragments are similar to UI View Controllers in iPhone development.
Activities — Activities, described in detail in the previous chapter,
represent the window, or screen, being displayed. Activities are the
Android equivalent of Forms in traditional Windows desktop
development. To display a UI, a View (usually a layout or Fragment) is
assingned to an Activity.
21
2.6. The Android Widget ToolBox
Android supplies a toolbox of standard Views to help you create your UIs. By
using these controls (and modifying or extending them, as necessary), you can
simplify your development and provide consistency between applications.
The following list highlights some of the more familiar toolbox controls:
TextView — A standard read-only text label that supports multiline
display, string formatting, and automatic word wrapping.
EditText — An editable text entry box that accepts multiline entry,
word-wrapping, and hint text.
Chronometer — A Text View extension that implements a simple countup
timer.
ListView — A View Group that creates and manages a vertical list of
Views, displaying them as rows within the list. The simplest List View
displays the toString value of each object in an array, using a Text View
for each item.
Spinner — A composite control that displays a Text View and an
associated List View that lets you select an item from a list to display in
the textbox. It’s made from a Text View displaying the current selection,
combined with a button that displays a selection dialog when pressed.
Button — A standard push button.
ToggleButton — A two-state button that can be used as an alternative to
a check box. It’s particularly appropriate where pressing the button will
initiate an action as well as changing a state (such as when turning
something on or off).
ImageButton — A push button for which you can specify a customized
background image (Drawable).
CheckBox — A two-state button represented by a checked or unchecked
box.
RadioButton — A two-state grouped button. A group of these presents
the user with a number of possible options, of which only one can be
enabled at a time.
ViewFlipper — A View Group that lets you define a collection of Views
as a horizontal row in which only one View is visible at a time, and in
which transitions between visible views can be animated.

VideoView — Handles all state management and display Surface


configuration for playing videos more simply from within your Activity.
QuickContactBadge — Displays a badge showing the image icon
assigned to a contact you specify using a phone number, name, email
address, or URI. Clicking the image will display the quick contact bar,
which provides shortcuts for contacting the selected contact — including
calling and sending an SMS, email, and IM.
2.7. Introducing Intents
Intents are used as a message-passing mechanism that works both within your
application and between applications. You can use Intents to do the following:
Explicitly start a particular Service or Activity using its class name.
Start an Activity or Service to perform an action with (or on) a particular
piece of data.
Broadcast that an event has occurred.
Intents can be used to support interaction among any of the application
components installed on an Android device, no matter which application they’re
a part of. This turns your device from a platform containing a collection of
independent components into a single, interconnected system.
One of the most common uses for Intents is to start new Activities, either
explicitly (by specifying the class to load) or implicitly (by requesting that an
action be performed on a piece of data). In the latter case the action does not
need to be performed by an Activity within the calling application.
Intents can also be used to broadcast messages across the system. Applications
can register Broadcast Receivers to listen for, and react to, these Broadcast
Intents. This enables you to create event-driven applications based on internal,
system, or third-party application events.
Android broadcasts Intents to announce system events, such as changes in
Internet connectivity or battery charge levels. The native Android applications,
such as the Phone Dialer and SMS Manager, simply register components that
listen for specific Broadcast Intents — such as “incoming phone call” or “SMS
message received” — and react accordingly. As a result, you can replace many
of the native applications by registering Broadcast Receivers that listen for the
same Intents.
Using Intents, explicitly loading classes to propagate actions even within the
same application are a fundamental Android design principle. It encourages the
decoupling of components to allow the seamless replacement of application
elements. It also provides the basis of a simple model for extending an
application’s functionality
2.7.1. Using Intents to Launch Activities
The most common use of Intents is to bind your application components and
communicate between them. Intents are used to start Activities, allowing you to
create a workflow of different screens.
Intent can be constructed to explicitly specify the Activity class to open, or to
include an action that the target Activity must be able to perform. In the latter
case, the run time will choose an Activity dynamically using a process known as
intent resolution.
By using startActivity, the application won’t receive any notification when the
newly launched Activity finishes. To track feedback from a sub-Activity, use
startActivityForResult.
2.7.2. Using Intents to Broadcast Events
As a system-level message-passing mechanism, Intents are capable of sending
structured messages across process boundaries. As a result, you can implement
Broadcast Receivers to listen for, and respond to, these Broadcast Intents within
your applications. Broadcast Intents are used to notify applications of system or
application events, extending the event-driven programming model between
applications.
Broadcasting Intents helps make your application more open by broadcasting
an event using Intent, you let yourself and third-party developers react to events
without having to modify your original application. Within your applications
you can listen for broadcast Intents to react to device state changes and thirdparty
application events. Android uses Broadcast Intents extensively to
broadcast system events, such as changes in network connectivity, docking
state, and incoming calls.

2.8. Introducing Fragments


Fragments enable you to divide your Activities into fully encapsulated reusable
components, each with its own lifecycle and UI.
The primary advantage of Fragments is the ease with which you can create
dynamic and flexible UI designs that can be adapted to suite a range of screen
sizes from small-screen smart phones to tablets. Each Fragment is an
independent module that is tightly bound to the Activity into which it is placed.
Fragments can be reused within multiple activities, as well as laid out in a
variety of combinations to suit multi pane tablet UIs and added to, removed
from, and exchanged within a running Activity to help build dynamic UIs.
Fragments provide a way to present a consistent UI optimized for a wide
variety of Android device types, screen sizes, and device densities. Although it
is not necessary to divide your Activities (and their corresponding layouts) into
Fragments, doing so will drastically improve the flexibility of your UI and make
it easier for you to adapt your user experience for new device configurations.
2.8.1. Interfacing Between Fragments and Activities
Use the getActivity method within any Fragment to return a reference to the
Activity within which it’s embedded. This is particularly useful for finding the
current Context, accessing other Fragments using the Fragment Manager, and
finding Views within the Activity’s View hierarchy.
TextView textView=(TextView)getActivity().findViewById(R.id.textview);
Although it’s possible for Fragments to communicate directly using the host
Activity’s Fragment Manager, it’s generally considered better practice to use the
Activity as an intermediary. This allows the Fragments to be as independent and
loosely coupled as possible, with the responsibility for deciding how an event in
one Fragment should affect the overall UI falling to the host Activity.
Where your Fragment needs to share events with its host Activity (such as
signaling UI selections), it’s good practice to create a callback interface within
the Fragment that a host Activity must implement.
2.9. Creating Content Providers
Content Providers provide an interface for publishing data that will be
consumed using a Content Resolver. They allow you to decouple the application
components that consume data from their underlying data sources, providing a
generic mechanism through which applications can share their data or consume
data provided by others.
To create a new Content Provider, extend the abstract ContentProvider class:
public class MyContentProvider extends ContentProvider
Like the database contract class described in the previous section, it’s good
practice to include static database constants particularly column names and the
Content Provider authority that will be required for transacting with, and
querying, the database.
It will also need to override the onCreate handler to initialize the underlying
data source, as well as the query, update, delete, insert, and getType methods to
implement the interface used by the Content Resolver to interact with the data.
2.9.1. Native Android Content Providers
Android exposes several native Content Providers, which you can access
directly using the techniques described earlier in this chapter. Alternatively, the
android provider package includes APIs that can simplify access to many of the
most useful Content Providers, including the following-
Media Store — Provides centralized, managed access to the multimedia
on your device, including audio, video, and images. You can store your
own multimedia within the Media Store and make it globally available.
Browser — Reads or modifies browser and browser search history.
Contacts Contract — Retrieves, modifies, or stores contact details and
associated social stream updates.
Calendar — Creates new events, and deletes or updates existing calendar
entries. That includes modifying the attendee lists and setting reminders.
Call Log — Views or updates the call history, including incoming and
outgoing calls, missed calls, and call details, including caller IDs and call
durations.

2.10.Firebase
Firebase is a platform for building mobile and web application. You can build application
quickly with real time data update. Using firebase is very easy and it stores data in JSON format.
You do not need to configure your server when you use firebase. Every thing will be handled by
firebase automatically. So no coding on server side. It will save time and will make you more
productive. In this firebase android tutorial we will do a very simple example of using firebase
for our android application. Obviously it takes more than client side code to build a true web
app. You’ll need a backend that handles a database, authentication, ajax, an accessible api, and
you'll need somewhere to host that backend. There are many things that make backend
development easier like Ruby on Rails, or services like Heroku but there is still a lot of
development time that goes into building these. Firebase takes care of most of the backend
concerns and is dubbed a Backend as a Service (BaaS).
Firebase is also a realtime api utilizing web sockets for pushing state to your application. This
means that an interactive app can be even more interactive as you don’t need to refresh the
browser to get updates; they are pushed in real-time.
Why Use Firebase?
• Super easy and quick to implement.
• No server side configuration needed. No PHP Scripts and No
Database Designs.
• Realtime update without using GCM.
2.10.1 Features
FireBase Cloud Messaging
Firebase Cloud Messaging (FCM) is a cross-platform messaging
solution that lets you reliably deliver messages at no cost.
Features:
• Send notification messages and data messages.
• Versatile message targeting.
• Send messages from client apps.
2.10.2 Real-time database

The Firebase Realtime Database is a cloud hosted database. Data is


synched across all clients in Realtime, and remains available when your
app goes offline.
Features:
• Realtime
• Offline
• Accessible from Client devices
Most applications need to know the identity of a user. Knowing a user's identity allows an app to
provide a customized experience and grant them permissions to access their data. The process of
proving a user's identity is called authentication. Firebase provides a full set of authentication
options out-of-the-box.
When a user authenticates to a Firebase app, three things happen:
• Information about the user is returned in callbacks on the client device. This allows you to
customize your app's user experience for that specific user.

• The user information returned contains a uid (a unique ID), which is guaranteed to be distinct
across all providers, and to never change for a specific authenticated user.

The value of the auth variable in your app's Security and firebase rules. becomes defined. Store
and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and
remains available when your app goes offline.The Firebase Realtime Database is a cloud-hosted
database. Data is stored as JSON and synchronized in realtime to every connected client. When
you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients
share one Realtime Database instance and automatically receive updates with the newest
data.The Realtime Database provides a flexible, expression-based rules language, called Firebase
Realtime Database Security Rules, to define how your data should be structured and when data
can be read from or written to. When integrated with Firebase Authentication, developers can
define who has access to what data, and how they can access it.

2.10.3 Authentication

• This variable isnull for unauthenticated users, but for authenticated users it is an object
containing the user's unique (auth.uid) and potentially other data about the user. This allows you
to securely control data access on a per-user basis.

2.10.4.Cloud messaging
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably
deliver messages at no cost.Using FCM, you can notify a client app that new email or other data
is available to sync. You can send notification messages to drive user reengagement and
retention. For use cases such as instant messaging, a message can transfer a payload of up to
4KB to a client app.
How does it work?

An FCM implementation includes an app server that interacts with FCM via HTTP or
XMPP protocol, and a client app. You can compose and send messages using the app
server or the Notifications console.

Firebase Notifications is built on Firebase Cloud Messaging and shares the same FCM
SDK for client development. For testing or for sending marketing or engagement
messages with powerful built-in targeting and analytics, you can use Notifications. For
deployments with more complex messaging requirements, FCM is the right choice

2.10.4. Miscellaneous features


• storage
Firebase Storage is built for app developers who need to store and serve user-
generated content, such as photos or videos.Firebase Storage provides secure file
uploads and downloads for your Firebase apps, regardless of network quality. You
can use it to store images, audio, video, or other user-generated content. Firebase
Storage is backed by Google Cloud Storage, a powerful, simple, and cost-effective
object storage service.
• Hosting
Firebase Hosting provides fast and secure static hosting for your web app.Firebase
Hosting is production-grade web content hosting for developers. With Hosting,
you can quickly and easily deploy web apps and static content to a global content-
delivery network (CDN) with a single command.

• Remote Config
Remote Config is a cloud service that lets you change the behavior and appearance
of your app without requiring users to download an app update. When using
Remote Config, you create in-app default values that control the behavior and
appearance of your app. Then, you can later use the Firebase console to override
in-app default values for all app users or for segments of your userbase.

• Test Lab
Test in the lab, not on your users

• Generate detailed reports and screenshots to help identify bugs

• Run custom test scripts on hundreds of device configurations


• Supplement your existing workflow through integration with Android Studio, command-
line tools, and Web-based consoles

• Crash Reporting

Crash Reporting creates detailed reports of the errors in your app. Errors are grouped into
clusters of similar stack traces and triaged by the severity of impact on your users. In addition to
automatic reports, you can log custom events to help capture the steps leading up to a crash.

2.11 Advanced Encryption Standard-

The more popular and widely adopted symmetric encryption algorithm likely to be
encountered nowadays is the Advanced Encryption Standard (AES). It is found at
least six time faster than triple DES.

A replacement for DES was needed as its key size was too small. With increasing
computing power, it was considered vulnerable against exhaustive key search
attack. Triple DES was designed to overcome this drawback but it was found slow.

2.11.1 Why AES?

AES is the successor of DES as standard symmetric encryption algorithm for US


federal organizations. AES uses keys of 128, 192 or 256 bits, although, 128 bit
keys provide sufficient strength today. It uses 128 bit blocks, and is efficient in
both software and hardware implementations. It was selected through an open
competition involving hundreds of cryptographers during several years.

DES is the previous "data encryption standard" from the seventies. Its key size is
too short for proper security. The 56 effective bits can be brute-forced, and that has
been done more than ten years ago. DES uses 64 bit blocks, which poses some
potential issues when encrypting several gigabytes of data with the same key.
3DES is a way to reuse DES implementations, by chaining three instances of DES
with different keys. 3DES is believed to still be secure because it requires 2^112
operations which is not achievable with foreseeable technology. 3DES is very slow
especially in software implementations because DES was designed for
performance in hardware.

2.11.2 Features and Functionality

The features of AES are as follows −

• Symmetric key symmetric block cipher


• 128-bit data, 128/192/256-bit keys
• Stronger and faster than Triple-DES
• Provide full specification and design details
Software implementable in C and Java

Functionality of AES-

AES is an iterative rather than Feistel cipher. It is based on ‘substitution–


permutation network’. It comprises of a series of linked operations, some of which
involve replacing inputs by specific outputs (substitutions) and others involve
shuffling bits around (permutations).

Interestingly, AES performs all its computations on bytes rather than bits. Hence,
AES treats the 128 bits of a plaintext block as 16 bytes. These 16 bytes are
arranged in four columns and four rows for processing as a matrix −

Unlike DES, the number of rounds in AES is variable and depends on the length of
the key. AES uses 10 rounds for 128-bit keys, 12 rounds for 192-bit keys and 14
rounds for 256-bit keys. Each of these rounds uses a different 128-bit round key,
which is calculated from the original AES key.

Encryption Process-

Here, we restrict to description of a typical round of AES encryption. Each round


comprise of four sub-processes. The first round process is depicted below −
Byte Substitution (SubBytes)-
The 16 input bytes are substituted by looking up a fixed table (S-box) given in
design. The result is in a matrix of four rows and four columns.

Shiftrows-
Each of the four rows of the matrix is shifted to the left. Any entries that ‘fall off’
are re-inserted on the right side of row. Shift is carried out as follows −

• First row is not shifted.


• Second row is shifted one (byte) position to the left.
• Third row is shifted two positions to the left.
• Fourth row is shifted three positions to the left.
• The result is a new matrix consisting of the same 16 bytes but shifted with
respect to each other.

MixColumns-

Each column of four bytes is now transformed using a special mathematical


function. This function takes as input the four bytes of one column and outputs
four completely new bytes, which replace the original column. The result is
another new matrix consisting of 16 new bytes. It should be noted that this step is
not performed in the last round.

Addroundkey-

The 16 bytes of the matrix are now considered as 128 bits and are XORed to the
128 bits of the round key. If this is the last round then the output is the ciphertext.
Otherwise, the resulting 128 bits are interpreted as 16 bytes and we begin another
similar round.

Decryption Process-

The process of decryption of an AES ciphertext is similar to the encryption process


in the reverse order. Each round consists of the four processes conducted in the
reverse order −

• Add round key


• Mix columns
• Shift rows
• Byte substitution
Since sub-processes in each round are in reverse manner, unlike for a Feistel
Cipher, the encryption and decryption algorithms needs to be separately
implemented, although they are very closely related.

2.11.3 AES Analysis-


In present day cryptography, AES is widely adopted and supported in both
hardware and software. Till date, no practical cryptanalytic attacks against AES
has been discovered. Additionally, AES has built-in flexibility of key length,
which allows a degree of ‘future-proofing’ against progress in the ability to
perform exhaustive key searches.

However, just as for DES, the AES security is assured only if it is correctly
implemented and good key management is employed.

CHAPTER 3

PROPOSED SYSTEM
The aim of proposed system is to develop a system of improved facilities. The
proposed system can overcome all the limitations of the existing system. The
system provides proper security and reduces the manual work. The existing
system has several disadvantages and many more difficulties to work well. The
proposed system tries to eliminate or reduce these difficulties up to some
extent. The proposed system will help the user to reduce the workload and
mental conflict. The proposed system helps the user to work user friendly and it
can be done without time lagging.
3.1. System Analysis
System analysis is a process of gathering and interpreting facts, diagnosing
problems and the information to recommend improvements on the system. It is
a problem solving activity that requires intensive communication between the
system users and system developers. System analysis or study is an important
phase of any system development process. The system is studied to the minutest
detail and analyzed. The system analyst plays the role of the interrogator and
dwells deep into the working of the present system.
The system is viewed as a whole and the input to the system are identified.
The outputs from the organizations are traced to the various processes. System
analysis is concerned with becoming aware of the problem, identifying the
relevant and decisional variables, analyzing and synthesizing the various factors
and determining an optimal or at least a satisfactory solution or program of
action.
A detailed study of the process must be made by various techniques like
interviews, questionnaires etc. The data collected by these sources must be
scrutinized to arrive to a conclusion. The conclusion is an understanding of how
the system functions. This system is called the existing system. Now the
existing system is subjected to close study and problem areas are identified. The
designer now functions as a problem solver and tries to sort out the difficulties
that the enterprise faces. The solutions are given as proposals. The proposal is
then weighed with the existing system analytically and the best one is selected.
The proposal is presented to the user for an endorsement by the user. The
proposal is reviewed on user request and suitable changes are made. This is loop
that ends as soon as the user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts, using the
information for further studies on the system. Preliminary study is problem
solving activity that requires intensive communication between the system users
and system developers. It does various feasibility studies. In these studies a
rough figure of the system activities can be obtained, from which the decision
about the strategies to be followed for effective system study and analysis can
be taken.
3.2. Feasibility Study
Feasibility study is made to see if the project on completion will serve the
purpose of playing the quiz application. Feasibility study lets the developer
foresee the future of the project and the usefulness. A feasibility study of a
system proposal is according to its workability, to meet the user needs and
effective use of resources. Thus when a new application is proposed it normally
goes through a feasibility study before it is approved for development.
The document provide the feasibility of the project that is being designed and
lists various areas that were considered very carefully during the feasibility
study of this project such as Technical, Economic and Operational
feasibilities. The following are its features:
3.2.1. Technical Feasibility
The system must be evaluated from the technical point of view first. The
assessment of this feasibility must be based on an outline design of the system
requirement in the terms of input, output, programs and procedures. Having
identified an outline system, the investigation must go on to suggest the type of
equipment, required method developing the system, of running the system once
it has been designed.
Technical issues raised during the investigation are:
Does the existing technology sufficient for the suggested one?
Can the system expand if developed?
The project should be developed such that the necessary functions and
performance are achieved within the constraints. The project is developed
within latest technology. Through the technology may become obsolete after
some period of time, due to the fact that never version of same software
supports older versions, the system may still be used. So there are minimal
constraints involved with this project. The system has been developed using
Java the project is technically feasible for development.
3.2.2. Economic Feasibility
The developing system must be justified by cost and benefit. Criteria to ensure
that effort is concentrated on project, which will give best, return at the earliest.
One of the factors, which affect the development of a new system, is the cost it
would require.
The following are some of the important financial questions asked during
preliminary investigation:
The costs conduct a full system investigation.
The cost of the hardware and software.
The benefits in the form of reduced costs or fewer costly errors.
Since the system is developed as part of project work, there is no manual cost
to spend for the proposed system. Also all the resources are already available, it
give an indication of the system is economically possible for development.

3.2.3. Behavioral Study


This includes the following questions:
Is there sufficient support for the users?
Will the proposed system cause harm?
The project would be beneficial because it satisfies the objectives when
developed and installed. All behavioral aspects are considered carefully and
conclude that the project is behaviorally feasible.
3.2.4. Cost Analysis
The cost regarding this project and maintenance of the project system is
negligible. Cost of essential hardware and software is not required much. The
proposed system is fully automated and hence easy to use. Since benefits out
base the cost, hence our application is economically feasible.
CHAPTER – 4

REQUIREMENT ANALYSIS AND SPECIFICATION


(SRS)

• Requirement Analysis
Identifying needs and evaluating the basic requirements to be added is based on the
following 7 key parameter

4.1.1 Interface Requirements

1. User Interfaces

This application gives a user friendly environment for sending the message and sending it
in the image (or any other file) and sending it to your friend i.e. add on your friend list
through the communication channel. Messages pop on the screen for proper processing of
the action on the data entered by the user. It offers many choices to the user for how to
send the message in the most secure fashion.

• Software Interfaces

This application is android based application. It works on all the android versions above
version 2.2. It does not include the use of any database but make use of the media files
(gallery) of the handset to store the message image.
• Communications Interfaces
We are using the communication channel (it includes via Bluetooth or through mail
services) in our project to send the message by message service over the internet from the
application whenever and who so ever the sender wants to.

• Requirements

4.2.1 Memory Requirements


No memory constraints are applicable. A normal memory configuration is more than
sufficient.

4.2.2Minimum Hardware Requirements


• 256 MB RAM

• 80 GB Hard Disk or more

• SD card and Smart Phone

4.2.3 Minimum Software Requirements


• Android operating system

• Eclipse

• firebase

4.3 Functional Requirement


• User will be able to send text messages and chat
• User will be able to send videos of size 2Mb
• User will be able to share images and audio
• User will be able to send various types of files like text file, document file and pdf file
• All data is uploaded and saved in database for future recovery process
• User will be able to secure its account through password locker
• User will be able to view and gain fast access to incoming messages through notifications
• User need not login again and again once registered
• User will not be charged any hidden cost other than the internet utilization cost
• User can even customize their profile
• User will be able to view status of other users
• User will be able to chat with multiple people

4.4 Non-Functional Requirement:

1. User friendly
The system is user friendly as it provides all the facilities of reporting the problems by the
client right at home so it helps to save his time and effort, and the working of the solution
procedure is so easy and understandable that any user can report a problem by just
understanding the procedure once.

2. Attractive layout
Each screen is designed in such a way that the user will feel enthusiastic while working
with the system.

3. Easy to learn
Due to the easy layout and its user friendliness, it is very easy to learn how to work with
the system. The user will feel relaxed and enjoy working with it.

4. Adaptive
The application is compatible with all versions of Android. It is able to provide all the
services of the application without any bugs.

4.5 Software Requirements Specification (SRS)


It is a description of a software system to be developed, laying out functional and non-functional
requirements, and may include a set of use cases that describe interactions the users will have
with the software.

Software requirements specification establishes the basis for an agreement between customers
and contractors or suppliers (in market-driven projects, these roles may be played by the
marketing and development divisions) on what the software product is to do as well as what it is
not expected to do. Software requirements specification permits a rigorous assessment of
requirements before design can begin and reduces later redesign. It should also provide a realistic
basis for estimating product costs, risks, and schedules.

The software requirements specification document enlists enough and necessary requirements
that are required for the project development.

To derive the requirements we need to have clear and thorough understanding of the products to
be developed or being developed. This is achieved and refined with detailed and continuous
communications with the project team and customer till the completion of the software.

4.5.1 Advantages of SRS:

Software SRS establishes the basic for agreement between the client and the supplier on what the
software product will do.

1. A SRS provides a reference for validation of the final product.

2. A high-quality SRS is a prerequisite to high-quality software.

3. A high-quality SRS reduces the development cost.

4.5.2 Characteristics of an SRS


1. Correct

2. Complete

3. Unambiguous

4. Verifiable

5. Consistent

6. Ranked for importance and/or stability

7. Modifiable

8. Traceable

An SRS is correct if every requirement included in the SRS represents something required in the
final system. An SRS is complete, if everything the software is supposed to do and the responses
of the software to all classes of input data are specified in the SRS. Correctness ensures that what
is specified is done correctly; completeness ensures that everything is indeed specified.

An SRS is unambiguous if and only if every requirement stated has one and only one
interpretation. Requirements are often written in natural language, which are inherently
ambiguous.

An SRS is verifiable if and only if every stated requirement is verifiable. A requirement is


verifiable if there exists some cost-effective process that can check whether the final software
meets that requirement. An SRS is consistent if there is no requirement that conflicts with
another.

4.6 System Quality Attributes


Within systems engineering, quality attributes are realized non-functional requirements used to
evaluate the performance of a system. These are sometimes named "ileitis" after the suffix many
of the words share. Notable quality attributes include:

• High Availability
High Availability is the measure of the quality of a software to keep functioning in spite
of problems. Since the 'problems' can be of many types, different technologies work in
tandem to achieve high availability for the overall system.

• Security
Security is the ability of the software to remain protected from unauthorized access. This
includes both change access and view access.

• Flexibility
Flexibility is the ability of software to adapt when external changes occur.

• Traceability
Traceability is the ability of the Software to offer insight into the inner processing when
required. A higher level of traceability is required at time of debugging a problem or at
times of new interoperability testing.

• Testability
Testability is the ability of a software to be tested thoroughly before putting into
production. This gets very useful in testing the new releases before production.
• Reliability
High Reliability is the measure of how a product behaves in varying circumstances.

• Efficiency
Efficiency is the ability of the software to do the required processing on least amount of
hardware.

• Resilience
Resilience is the ability of software to absorb sudden bursts of legitimate loads. The
application uses different techniques of Resilience for different types of loads.

• Compatibility
Compatibility is the ability of the software to work with other systems. This application is
compatible with all android versions above 2.2.

• Modularity
Modularity is the measure of the extent to which software is composed of separate,
interchangeable components, each of which accomplishes one function and contains
everything necessary to accomplish this. Modularity increases cohesion and reduces
coupling and makes it easier to extend the functionality and maintain the code.

• Customizability
Customizability is the ability of software to offer extensions to existing functionality to
better suited the needs of a user.

• Integrity
Integrity is the ability of software to maintain correctness and harmony among all related
pieces of data.

• Manageability
Manageability is the ability of a software to be managed from different perspectives.

• Usability
Usability is the ability of a software to offer its interfaces in a user friendly and elegant
way.
CHAPTER – 5

DESIGN DOCUMENTS
5.1 System Design
Based on the user requirements and the detailed analysis of a new system, the new
system must be designed. This is the phase of system designing. It is the most
crucial phase in the development of a system.

The logical system design arrived at as a result of system analysis and is converted
into physical system design. In the design phase the SDLC process continues to
move from the what questions of the analysis phase to the how .

The logical design produced during the analysis is turned into a physical design -
a detailed description of what is needed to solve original problem. Input, output,
databases, forms, codification schemes and processing specifications are drawn up
in detail. In the design stage, the programming language and the hardware and
software platform in which the new system will run are also decided. Data
structure, control process, equipment source, workload and limitation of the
system, Interface, documentation, training, procedures of using the system, taking
backups and staffing requirement are decided at this stage.

There are several tools and techniques used for describing the system design of the
system. These tools and techniques are: Flowchart, Data flow diagram (DFD),
Data dictionary, Structured English, Decision table and Decision tree.

5.2 Data Flow Diagram


Data flow diagram (DFD) represents the flows of data between different
processes in a business. It is a graphical technique that depicts information
flow and the transforms that are applied as data move form input to output

5.2.1 Level 0 DFD

Figure 5.1: Level 0 DFD

Level 0 Dfd describes the data store and the process flow possible between
the three major entities: mobile, gcm and the server.
5.2.2 Level 4 DFD

Figure 5.2: Level 4 DFD


5.3 Activity Diagram
Figure 5.3: Activity diagram of chatting activity

5.4 Use Case Diagram Of Overall System


ACTOR

MOBILE SYSTEM

Figure-5.5: Use Case Diagram of Overall System

CHAPTER 6
IMPLEMENTATION

6.1 Authentication Process

Authentication is a process in which the credentials provided are compared to


those on file in a database of authorized users’ information on a local operating
system or within an authentication server. If the credentials match, the process is
completed and the user is granted authorization for access. The permissions and
folders returned define both the environment the user sees and the way he can
interact with it, including hours of access and other rights such as the amount of
allocated storage space.
The process of identifying an individual, usually based on a username and
password. In security systems, authentication is distinct from authorization , which
is the process of giving individuals access to system objects based on their identity.
Authentication merely ensures that the individual is who he or she claims to be, but
says nothing about the access rights of the individual.
In Sign-In process, we take description of personal information about user and
saved it in database and then user can Sign-Up with phone number and password
anytime.
6.2 Database Description

In Chatmate we use Firebase ,a realtime database which has some in-built


features.Firebase is a platform for building mobile and web application. You can
build application quickly with real time data update. Using firebase is very easy
and it stores data in JSON format. You do not need to configure your server when
you use firebase. Every thing will be handled by firebase automatically. So no
coding on server side. It will save time and will make you more productive. In
this firebase android tutorial we will do a very simple example of using firebase
for our android application. Obviously it takes more than client side code to build a
true web app. You’ll need a backend that handles a database, authentication, ajax,
an accessible api, and you'll need somewhere to host that backend. There are many
things that make backend development easier like Ruby on Rails, or services like
Heroku but there is still a lot of development time that goes into building these.
Firebase takes care of most of the backend concerns and is dubbed a Backend as a
Service (BaaS).
Firebase is also a realtime api utilizing web sockets for pushing state to your
application. This means that an interactive app can be even more interactive as you
don’t need to refresh the browser to get updates; they are pushed in real-time.
6.3 Encryption Description

In chatmate, we use AES Algorithm to provide security to the messages that are
delivered from one user to an other user. we use two java classes in it ,
AESHelper.java and EncryptionUtils.java.
6.4 Realtime Chatting
In Chatmate different type of user can interact with eachother . New user first
have to do Sign-up and then after adding title as "User-name" user can chat with
others with that user name. Once user name is saved, one dont need to change it
.All detailes are saved in realtime storage.All messaging can be seen in realtime
database Firebase but all messages are encrypted.
CHAPTER 7

TESTING

6.1 Definition Of Testing


Software testing is an investigation conducted to provide stakeholders with
information about the quality of the product or service under test.
Software testing is the process of evaluation the software item to detect differences
between given output also to access the feature of the software item .testing access
the quality if the product . software testing is the process that should be done
during the development process. In other words software testing is verification and
validation process.
Software testing can also provide an objective, independent view of the software to
allow the business to appreciate and understand the risks of software
implementation. Test techniques include, but are not limited to the process of
executing a program or application with the intent of finding software bugs (errors
or other defects).
Software testing can be stated as the process of validating and verifying that a
computer program/application/product:
1.meets the requirements that guided its design and development,
2.works as expected,
3. can be implemented with the same characteristics,and satisfies the needs of
stakeholders.
Software testing, depending on the testing method employed, can be implemented
at any time in the software development process. Traditionally most of the test
effort occurs after the requirements have been defined and the coding process has
been completed, but in the Agile approaches most of the test effort is on-going. As
such, the methodology of the test is governed by the chosen software development
methodology.

There are two types of testing:

6.1.1 Functional Testing:

Functional testing refers to activities that verify a specific action or function of the
program. These are usually found in the requirements documentation, although
some development methodologies work from use cases or user stories. Functional
tests tend to answer the question of “can the user do this” or “does this particular
feature work”.

6.1.2 Non Functional Testing:

Non functional testing refers to aspects of the software that may not be related to a
specific function or user function, such as scalability or security. Non functional
testing tends to answer such questions as “how many people can use at once“.

Performance Requirements

The application must run smoothly during chating process and should provide
quick response.and if no network connection are there so this application does not
run only we can view the previous messages.
Security Requirements
The password should not be known to anyone else other than the authentic user.
the length of password should be greater then 4 and the password should be in
numeric value.

6.2 Levels Of Testing

6.2.1 Unit Testing

It is also known as component testing refers to tests that verify the functionality
specific section of code, usually at the function level. In an object-oriented
environment, this is usually at the class level, and the minimal unit tests include
the constructors and destructors.

These types of tests are usually written by developers as they work on code
(white-box style), to ensure that the specific function is working as expected. One
function might have multiple tests, to catch corner cases or other branches in the
code. Unit testing alone cannot verify the functionality of a piece of software, but
rather is used to assure that the building blocks the software uses work
independently of each other.
Unit testing is a software development process that involves synchronized
application of a broad spectrum of defect prevention and detection strategies in
order to reduce software development risks, time, and costs. It is performed by
the software developer or engineer during the construction phase of the software
development lifecycle.

6.2.2 System Testing


System testing, or end-to-end testing, tests a completely integrated system to verify
that it meets its requirements. For example, a system test might involve testing a
logon interface, then creating and editing an entry, plus sending or printing results,
followed by summary processing or deletion (or archiving) of entries, then logoff.
In addition, the software testing should ensure that the program, as well as working as expected,
does not also destroy or partially corrupt its operating environment or cause other processes
within that environment to become inoperative (this includes not corrupting shared memory, not
consuming or locking up excessive resources and leaving any parallel processes unharmed by its
presence).

6.2.3 Integration Testing


Integration testing is any type of software testing that seeks to verify the interfaces between
components against a software design. Software components may be integrated in an iterative
way or all together ("big bang"). Normally the former is considered a better practice since it
allows interface issues to be located more quickly and fixed.
Integration testing works to expose defects in the interfaces and interaction between integrated
components (modules). Progressively larger groups of tested software components
corresponding to elements of the architectural design are integrated and tested until the software
works as a system.
6.2.4 Acceptance Testing
Acceptance testing -Normally this type of testing is done to verify if system meets the customer
specified requirements. User or customers do this testing to determine whether to accept
application

7. SNAPSHOTS

S-ar putea să vă placă și