Sunteți pe pagina 1din 100

MAJOR PROJECT REPORT

(January 2015 May 2015)

BLOOD BANK
(Complete Android Industrial Training)

Under the Guidance of


Internal coordinator

External coordinator

Miss. Navpreet Kaur


Assistant Professor

Mr. Pankaj Kumar


Software Developer
Submitted by
PREETI
Reg. No. 11003981
MCA-RD1210B26

School of Computer Application (SCA)


LOVELY PROFESSIONAL UNIVERSITY
(Phagwara)
1

DECLARATION

I hereby declare that the project work entitled Blood Bank System is
an authentic record of my own work carried out at OneInfoNet
Technologies, as requirements of Industry Internship project for the
award of degree of MCA 6th SEM, Lovely Professional University,
Phagwara, Punjab, under the guidance of Miss Navpreet Kaur
(Internal Supervisor) and Mr Pankaj Kumar (External Supervisor),Mr.
Puneet Mangla(Faculty Co-ordinator).
The matter reported in this project has not been submitted earlier
anywhere else for the award of any other award of Diploma/Degree.

Date: 29th April 2015


Place: Lovely Professional University

Team Members

University Registration

Preeti

11003981

Veena Devi

11308128

Manpreet Singh

11311538

Hardeep Singh

11311222

Number Signature

CERTIFICATE

This is to certify that the Major Project report entitled Blood Bank System
submitted by Preeti (11003981), Veena Devi (11308128), Manpreet
Singh(11311538), Hardeep Singh(11311222) has been carried out under my
guidance & supervision in OneInfoNet Technologies. The project report is
approved for submission towards partial fulfillment of the requirement for the
award of degree Master of Computer Applications from Lovely Professional
University, Jalandhar, Punjab.

External supervisor

Internal Supervisor

Mr Sahil Sharma

Miss Navpreet Kaur

Software Developer

Asst. Professor

One InfoNet Technologies, Chandigarh.

School of Computer Application

Acknowledgement

This project is a welcome and challenging experience for us as it took a great


deal of hard work and dedication for its successful completion. It is our pleasure
to take this opportunity to thank all those who help us directly or indirectly in
preparation of this report.
There are a number of people that We would like to acknowledge for continuing
support and kind help that they has been offered to us. Firstly, a huge thanks to
our extremely inspiring, extraordinary and kind mentor Mr Pankaj Kumar,
thanks for believing in us and guiding us, it has been an honor to be your
student. Without their guidance and support, this paper would not have seen
light of the day. It gives us immense in expressing a deep sense of gratitude and
sincere thanks to Lovely Professional University. I also extend my thanks to
other Faculties for their Cooperation during my project.
We would also like to express thanks to my fellow graduates students for being
there with us in our every problem. Last but not the least we thanks our family
for their boost, your patience, your understanding and for caring about us and
support in every sphere.

Preeti
Veena Devi
Manpreet Singh
Hardeep Singh

Table of Content
1. Company Profile......................................................................................... 7
Name of the Organization............................................................... 7
Products of OneInfoNet................................................................. 8
2. Profile of Problem............................................................................................ 9
Existing System................................................................................9
Disadvantage................................................................ 9
Introduction to Blood Bank........................................................ 9
Advantage.....................................................................9
3. Project Analysis..............................................................................................10
Product Definition..........................................................................10
Feasibility Analysis........................................................................10
Technical Feasibility Study........................................10
Economic Feasibility Study........................................10
Legal Feasibility Study...............................................10
Operational Feasibiliy................................................11
Project Plan.....................................................................................17
4. Software Requirement Analysis & Tools.......................................................18
Introduction....................................................................................18
General Description.....................................................................18
Android......................................................................18
Android SDK...........................................................20
JAVA........................................................................21
XML.......................................................................22
SQLite......................................................................23
E draw Max..............................................................24
SQLite browser........................................................25
SPECIFIC REQUIREMENT...................................25
Hardware..............................................25
Software...............................................25
5. Design.............................................................................................................26
Data Flow Diagram...........................................................................26
0 Level DFD..................................................................27
1 Level DFD..................................................................28
DFD for Donor Module............................28
DFD for Blood Seeker Module.................29
5

E-R Diagram.......................................................................................32
Table Structure..................................................................................33
6. Testing...........................................................................................................34

Functional Testing.......................................................................34
Structural Testing........................................................................35
Unit Testing.................................................................................35
Integration Testing.......................................................................35
System Testing............................................................................36
Acceptance Testing.....................................................................36

7. Test Cases of Project......................................................................................37


Test Cases for Login Activity...................................................37
Test Cases for Add User Activity.................................................37
Test Cases for Add Case Activity.................................................40
8. Implementation..............................................................................................41
Implementation of the Project......................................................41
Conversion Plan............................................................................41
Post Implementation & Software Maintenance............................41
9. Project Legacy..............................................................................................43
Current Status of Project..........................................................43
Future Scope & Enhancement.................................................43
Technical Skill Learn...............................................................43

10. User Manual................................................................................................44


Screenshot of Front End...................................................................44
Blood Donor Module.............................................. 44
User Manual for Blood Seeker Module............................................45
11. Source Code..................................................................................................49
12.Bibliography...99

1.

COMPANY PROFILE

Name of the Organization


Overview:
OIT was founded by Mr. Prabhjot Singh on 1st September, 2006 with a young team of 5 IT
Engineers in a small room at Punjabi Bagh, New Delhi with a dream of developing new
generation applications. Due to our defined goals and dedications from the first day of our
inception we all knew that we are on a path of major breakthroughs and in just few months
we were out with indigenously developed database engine which surpassed all the
timestamps of Major Database in the market with one third Transaction Cost.
This was our first step towards world of innovations and it was followed by series of products
with Artificial Intelligent Forecasting tools launched by OIT. As OIT was expanding due to
growth in its Capability and Maturity Levels, OIT entered the world of IT Services
Outsourcing in January 2010 and in just Nine months our company has joined the club of Top
Programmers on various platforms with more than 100% client satisfaction.
Apart from Product development and Outsourcing OIT started its IT Training services in
April 2009 and in first year we shaped the careers of more than 320 students in the field of IT
and also gave breaks to some of outshining professionals. OIT introduced the policy of
Distribute Knowledge Gain Knowledge and its every developer devotes at least two hours
in bringing up future professionals.
From a small room, OIT now has three delivery centers across continents with world class
infrastructure and from a team of 5 people we are now ever-growing team of 50 senior
professionals.
Clients:
GUY ARISTIDE (USA),IMED CHERIF (FRANCE),HAIM COHEN
(NETHERLANDS),ZOLTAN (NETHERLANDS),GEORGE (GREECE)
Offices:
E-38, ELTOP IT Park,
Industrial Area, Phase VIII-A,
Mohali, Punjab
435-R, First Floor,
Model Town,
Opposite Bikaner Sweets,
Ludhiana, Punjab
7

Services:
Consulting services
Developing services
Outsourcing services
Industrial service solutions

Products of One Infonet

OIT P SERIES DATABASE


OIT 10P DATABASE ENGINE
OIT LOG MINER
OIT 30P FUSION SERVER
OIT 40P IN MEMORY DATABASE
OIT ENTERPRISE MANAGER
OIT DIAGNOSTIC MANAGER
OIT 20P DATABASE SERVER
OIT DATA MONITOR
OIT RECOVERY MANAGER
OIT AUTO STORE MANAGER
OIT PERFORMANCE MANAGER
OIT QUERY BUILDER

OIT STANDALONE APPS

OIT 10P DATABASE ENGINE


OIT LOG MINER
OIT 30P FUSION SERVER
OIT 40P IN MEMORY DATABASE
OIT ENTERPRISE MANAGER
OIT DIAGNOSTIC MANAGER

OIT WEB APPS

OIT 10P DATABASE ENGINE


OIT LOG MINER
OIT 30P FUSION SERVER
OIT 40P IN MEMORY DATABASE
OIT ENTERPRISE MANAGER
OIT DIAGNOSTIC MANAGER

2. PROFILE OF PROBLEM
Existing System
Maintenance and updating of blood bank records, currently, are done manually which, at
times, results in loss of critically important records or delayed information updates. Listed
below are some of the problems that are faced by the blood bank officials while using the
present system.
The main purpose of this system is to handle and maintain the management of blood bank.
The primary target is only a blood transfusion unit. This system is combination of three sub
modules; there are blood module, patient module and donor module.
Disadvantage

Records are maintained in books or files and are subject to loss and or damage.
Difficult to calculate amount of blood in stock.
Difficulties in retrieving data (for any specific reason).
Records are very liable to be misfiled or soiled.
Securities of records are minimum.
Difficult of making reports.
Difficulty in identifying blood expiry date.

Introduction to Blood Bank


Our proposed system will have interface available to collect the information of the Blood
donor and view all the details of the blood donor and store them at single place called server
dynamically. This detail can be easily viewed and used by the blood Seeker to their
emergency. This system helps to resolve the blood seeker problem in case of emergency.
The goal of this blood bank app is to perform a main role to save the human life by searching
the blood donor detail and blood donor in few second. In case of emergency the blood seeker
is to find easily blood donor nearby that area.
Advantage:

The Joy of Saving Human Lives.


Reduces the Risk of Cancer.
Free Health Check-up.
Reduces Risk of Heart Disease.
Burns Calories.
Better Blood Flow.
Balance Iron Levels in Your Blood.
9

3. PROJECT ANALYSIS

PRODUCT DEFINITION

Blood Bank System is an android App which helps a needy and save a precious life of the
patients. It provides user friendly interface. The app also facilitates users to easily register and
donate the blood. In this project we use Java and for designing purpose XML language and
SQL-Server as database. So its a fully functional application having nice user interface and
best functionality.

FEASIBILITY ANALYSIS

The feasibility study is an evaluation and analysis of the potential of the proposed project
which is based on registration of the Donor and research the Donor. Various issues of
feasibility analysis considered in project are as follows:-

Technical Feasibility Study


Technically we analyses that it is possible to develop such system with Java Because Java is
pure object oriented language which provides enough functions to implement various
functionalities. Various design issues of app can be resolved by using XML and front-end
validations can be implement with the help of java. MYSQL Can is used as database which is
compatible with PHP for implementing web services at server side.

Economic Feasibility Study


This app is also economically feasible because it can easily be deployed on Google play.
Google offers the Google Play service in which programmers can offer their Android
application to Android users. Google phones include the Google Play application which
allows installing applications. Google Play also offers an update service, e.g. if a programmer
uploads a new version of his application to Google Play, this service will notify existing users
that an update is available and allow to install it.

Legal Feasibility Study


Since the project needs no copyright, patenting, and doesnt intent to have any relation with
anybody elses intellectual property rights, it can be considered as a legally feasible project.

Time Feasibility Study


As it has been more probable (as per the requirements, functions, and performance
specifications of the system) that the project can be completed within the given time frame, it
is considered that the undertaking this project is feasible in the context of time.

10

Operational Feasibility
Operational feasibility criteria measure the urgency of the problem (survey and study phases)
or the acceptability of a solution (selection, acquisition and design phases).
This application is operational feasible. User can change anything according to his time to
time requirements. It is easy to understand and any user who is not related to any technical
field can easily use this application. These all things make this application feasible in all
aspects.

PROJECT RULES AND REQUIREMENTS

Sr. No

Module

Description

Sign Up

Donors Can Register by providing the required detail

Search

User can search for the required blood group in


different cities.
User can also contact with the donor.

Facts

User can view the facts related to blood.

Benefits

User can also view the benefits of donating blood.

Feedback

User can give the feedback of the application.

Rate us

User can rate the application from this module.

11

Risk Assessments

Network failure can interrupt the communication between the users.


Sr. No

Features

Description

An effective and an automated

To overcome the problem of extracting data


process

User friendly interface

Users can easily view and share data.

Search

User can search the blood of different groups

Feedback

Proper feedback can be given of the application

Project Plan from various websites.

Project Planning defines the project activities and end products that will be performed and
described how the activities will be accomplished. The purpose of project planning is to
define each major task, estimate the time and resources required, and provide a framework
for management review and control. The project planning activities and goals include
defining:
i.

The specific work to be performed and goals that define and bind the project.

ii.

Estimates to be documented for planning, tracking, and controlling the project.

iii.

Commitments that are planned, documented, and agreed to by affected groups.

iv.

Project alternatives, assumptions, and constraints.

The planning process includes steps to estimate the size of the project, estimate the resources
required to complete the project, produce a schedule, identify and access risks, and negotiate
commitments.

12

Steps in the Planning Process

The planning process consists of following basic tasks:

Define the project goals

Clear project goals are very crucial because the success of project will be determined by how
closely one meets them. A clear project goal is both specific and measurable.
A project's objectives may include:
i. A list of project deliverables.
ii. Specific due dates, both for the ultimate completion of the project and for intermediate
milestones.
iii. Specific quality criteria that the deliverables must meet.
iv. Cost limits that the project must not exceed.

Identify your project assumptions

During the planning stage of a project, many things arises in one's mind like key resources
required to start work or time required to complete a process and other such issues. Consider
these project areas when you identify your underlying assumptions:
i.

Handoffs from other projects or departments: If your project depends on the work
of others, do they understand your dependency and agree to the handoff dates?

ii.

Task durations: If the task estimates are based on solid information or guesses?

iii.

Project costs: Determining the cost to project?

iv.
Available time: If you're working toward a known deadline, can we realistically
complete all tasks with an acceptable level of quality?

Identify your project constraints

Constraints on a project are factors that are likely to limit the project manager's options.
Typically, the three major constraints are:
i.

Schedule: such as a fixed end date or a deadline date for a major milestone.

ii.

Resources: such as a predefined budget.

iii.

Scope: such as a requirement that three models of the product be developed.

A change in one of these constraints usually affects the other two and can affect overall
quality. For example, decreasing project duration (schedule) may increase the number of

13

workers you'll need (resources) and reduce the number of features that can be included in the
product (scope).

Identify all deliverables associated with the project

After the finalization of goals of the project one can define the actual product or service that
meets those goals. This product or service is called a deliverable. Where appropriate, one can
record information about the deliverables in the project.
A deliverable is tangible as well as verifiable. To be verifiable, the deliverable must meet
predetermined standards for its completion, such as design specifications for a product (like a
new car) or a checklist of steps that is completed as part of a service.
Organize your project tasks around the deliverables: A project can have one or many
deliverables. You can organize your project's tasks around the deliverables in several ways:
i.
Assign each deliverable to a separate phase of the project, and use a milestone
that represents the completion of both the deliverable and the phase simultaneously.
ii.
Group similar deliverables or deliverables with the same stakeholders in a phase.
This method allows you to schedule a team to work on a project until the deliverable is
handed off. Then the team can move on to other projects.

Define and sequence the tasks to be performed.

The task list is the heart of a projectan incomplete or badly planned task list can seriously
hamper your project's progress. Organizing tasks into milestones and phases gives structure
to the project and makes it easier for you to evaluate progress.
In its core, a project is a set of tasks. Each task represents a piece of work that must be done
to complete the project. A properly defined task is one that has a clear beginning and end, so
that the project manager can easily determine when the task is complete.
Keep the following in mind when you make tasks:
i. For practical purposes, tasks should be at least one day long. In long-term projects, tasks
are likely to have longer durations. In short-term projects, they tend to have shorter durations.
ii. Generally, it's a good idea to enter tasks in the order in which you expect work to begin on
them.

14

Create a milestone: Milestones allows us to create reference points that mark major events
in a project. Milestones are used to monitor the project's progress.

Schedule all tasks to be performed

Depending on how you schedule the tasks, Project can predict finish dates for the tasks and
the project as you enter information about how the project is progressing. You can use this
information to determine whether your project schedule is at risk.
There are two key ways to sequence tasks:
i.
Use a dependency: to indicate that work on a task cannot begin or end until work
on another task begins or ends. For example, you use a dependency if painting can't start until
preparation work is finished.
ii.
Use a constraint: to indicate that work on a task must begin or end in relation to a
specific date. For example, you use a constraint if a task must end by June 30, because the
subject matter expert will be unavailable after that time.
iii.
Sequence your project task: At this point, you should have entered some tasks
that must be completed in order to complete your project. Each task should be associated with
a duration, which indicates how long the task will take to complete.
iv.
Link tasks according to their dependencies on one another. Specifying the
sequence for your tasks includes showing which tasks overlap or have a delay between
them.
v.
Create a milestone to represent an external dependency. When one want to
track an event but he/she can't link to it because the event doesn't appear in any project,
he/she can create a milestone to represent the event.
vi.
Create a deadline for a task. To be notified when a task is finished after a
particular date, you can create a deadline.
vii.
Tie a task or phase to a specific date. When you absolutely must start or finish a
task on a particular date, tie a task or phase to a specific date. That date can represent an
event.

15

Estimate the resources required to perform each task.

After identifying the project scope, including setting up the task list and estimating the task
durations, one can use this information to make preliminary estimates, identify requirements,
and start staffing and procurement processes to acquire the required resources.
i.

Identify and estimate resource requirements

After the establishment of the scope and objectives and set up of the task list in your project
plan, one is ready to plan resources and need to follow some steps:
a. Review the project scope and task list.
b. Obtain historical resource and duration information.
c. Consider how the resource numbers affect durations.
d. Review and refine the duration estimates.
e. Identify the resource types and quantities needed.
ii.

Change duration

Use the collected information about this project and similar projects to refine the task
duration estimates.
ii.

Develop proposed resources:

At this point, you are ready to list the resource types and quantities. You can enter and
compile this resource information in Project and submit it as part of your resource proposal

Identify known risks in executing the project.

Creating an efficient project design likewise involves risk analysis. Risks factored in/analysis.
Know what the prospective hazard and losses of the project can be and how to crush them.

16

PROJECT PLAN

Project planning is performed basically in the large organization where it requires effective
management to control and to find the desired result. Project planning for an organization has
following steps:

Acquiring and organizing the tools and resources for the project.
Preparation of well-defined schedule for events of the project.
Proper evaluation of progress of project development.
Establishing various standards for the project by which we can find the
standard output.

We had the time from January 2015 to April 2015 for the project preparation thus within this
duration we had to estimate everything to prepare this project. According to the first step we
acquired the resources and organize them in well-defined manner so that there we should not
face any problem. The second thing is distributing the time stamp into small time unit
according to the module of the project. This is the term as schedule the task according to the
event happened in the project. We distributed the time into different module of the whole part
of the project development.
Evaluating the progress of project development is to measure the
functionality of the project by comparing with the requirement criteria. It is told that we
cannot do anything if we have not properly measure the task which you are going to do. This
is a project which has everything in it so the proper plan is much necessary. Initially, the
project must establish the objectives of each phase of development. Each phase must be of a
controllable size, and every task within the project must be performed with responsibility. We
first established the objectives of each phase and at last we guessed that the objectives that
have been established are met in the proper time.

17

4. SOFTWARE REQUIRMENT ANALYSIS & TOOLS


Introduction:
One of the most difficult tasks is that the selection of the software, once system requirement
is known is determining whether a particular software package fits the requirements. After
initial selection further security is needed to determine the desirability of particular software
compared with other candidates. This section first summarizes the application requirement
question and then suggests more detailed comparisons:

GENERAL DESCRIPTION

Android

Android is a modern, open source operating system and SDK for mobile devices developed
by Google. With it you can create powerful mobile applications. This becomes even more
attractive when your applications can access Web services, which means you; need to speak
the language of the Web: XML. In this article, you will see different options for working with
XML on Android and how to use them to build your own Android applications.
-The Linux kernel 2.6-which includes useful drivers that allow for example Wi-Fi or
Bluetooth.
-The library written in C and C + + that provide higher level functionality such as an HTML
engine, or a database (SQLite).
-A runtime environment for applications based on a virtual machine, made for inefficient
machines such as telephones. The aim is to translate JAVA in machine language understood
by Android.
-A JAVA framework that allows applications running on the virtual machine to organize and
cooperate.

Why Android is better..?


This is a list of features in the Android operating system.

Applications

Android includes most of the time many Google applications like Gmail, YouTube or Maps.
These applications are delivered with the machine most of the time, except in certain cases,
such as some phones running android on which the provider has replaced Google applications
by its own applications.

Widgets
18

With android, it is possible to use widgets which are small tools that can most often get
information. These widgets are directly visible on the main window.

Android Market

This is an online software store to buy applications. Developers who created applications can
add them into the store, and these applications can be downloaded by users, they can be both
free and paid.

Multitasking

Android allows multitasking in the sense that multiple applications can run simultaneously.
With Task Manager it is possible view all running tasks and to switch from one to another
easily.

Messaging

SMS and MMS are available forms of messaging, including threaded text messaging and
Android Cloud to Device Messaging (C2DM) and now enhanced version of C2DM, Android
Google Cloud Messaging (GCM) is also a part of Android Push Messaging service.

Voice based features

Google search through voice has been available since initial release. Voice actions for
calling, texting, navigation, etc. are supported on Android 2.2 onwards. As of Android 4.1,
Google has expanded Vce Actions with ability to talk back and read answers from Google's
Knowledge Graph when queried with specific commands. The ability to control hardware has
not yet been implemented.

Connectivity

Android supports connectivity technologies including GSM/EDGE, Wi-Fi, Bluetooth, LTE,


CDMA, EV-DO, UMTS, NFC, IDEN and WiMAX.

Bluetooth

Supports voice dialing and sending contacts between phones, sending files (OPP),
accessing the phone book (PBAP), A2DP and AVRCP. Keyboard, mouse and joystick (HID)
support is available in Android 3.1+, and in earlier versions through manufacturer
customizations and third-party applications.

Media support

Android supports the following audio/video/still media formats: WebM, H.263, H.264,
AAC, HE-AAC (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP
container), MP3, MIDI, Ogg Vorbis, FLAC, WAV, JPEG, PNG, GIF, BMP, WebP.
19

External storage

Most Android devices include microSD slot and can read microSD cards formatted with
FAT32, Ext3 or Ext4 file system. To allow use of high-capacity storage media such as USB
flash drives and USB HDDs, many Android tablets also include USB 'A' receptacle. Storage
formatted with FAT32 is handled by Linux Kernel VFAT driver, while 3rd party solutions
are required to handle other popular file systems such as NTFS, HFS Plus and exFAT.

Java support

While most Android applications are written in Java, there is no Java Virtual Machine in
the platform and Java byte code is not executed. Java classes are compiled into Dalvik
executables and run on Dalvik, a specialized virtual machine designed specifically for
Android and optimized for battery-powered mobile devices with limited memory and CPU.
J2ME support can be provided via third-party applications.

Storage

SQLite, a lightweight relational database, is used for data storage purposes.

The basics of creating Android apps:


To begin to program for Android I needed some basics, because some elements are very
different, even if programming an application in Android uses the Java language, therefore,
an object oriented language. Firstly, in an Android application, there is no main method:
public static void main(String[] args){...}
This method that allows to launch a program in java is not present in an application android.
This example is only the first of a long list.

Activity:
An activity is a user interface that allows the user to interact with the screen, to perform
actions. For example, a text messaging application could have an activity that displays a list
of contacts to send messages. Once the contact is selected, activity could send information to
a second activity that could serve to send the message to the contact.
When an application is launched, what it displays is the result of an activity. At
the code level, for create an activity; you must create a class that extends the Activity class.
An activity has a required onCreate () method. It is the main method. To interact with the
program, through the activity, there must be something displayed, that is why the activity,
contains what is called views.

View:
20

A View is the basic building block for user interface components. A View occupies a
rectangular area on the screen. View is the base class for widgets, which are used to create
interactive UI components (buttons, text fields, etc.).There are different kinds of views, for
example a List-View is able to display only an interactive list of what you want to display,
while a Web-View allows you to display a web page. As said before, a view occupies a
rectangular area on the screen. To organize these rectangles on the screen, there is a text file
written in XML for every different screen.

Android SDK

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 (any modern desktop Linux distribution), Mac OS X 10.5.8
or later, and Windows XP or later. For the moment one can also develop Android software on
Android itself by using the AIDE - Android IDE - Java, C++ app and the Java editor app. The
officially supported integrated development environment (IDE) is Eclipse using the Android
Development Tools (ADT) Plugin, though IntelliJ IDEA IDE (all editions) fully supports
Android development out of the box, and NetBeans IDE also supports Android development
via a plugin. 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).

Java

Java is a programming language and computing platform first released by Sun Microsystems
in 1995. There are lots of applications and websites that will not work unless you have Java
installed, and more are created every day. Java is fast, secure, and reliable. From laptops to
datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is
everywhere.
If you want to get started with application development, Google provides a
Java API to get started and compiles your files into classes. Why did Android prefer Java for
its development platform? There are multiple reasons such as; Java is a commonly used
language and many programmers know it, it can run on a virtual machine (VM) so no need to
recompile for different phones, better security, many development tools available for Java,
and Java is a known industry language with most phones compatible with it.
Though Google provides the Java API, Android does not use JVM to execute class files.
Rather, it uses Dalvik Virtual Machine (DVM). The class files are compiled into Dalvik
Executable (DEX) format, and bundled as Android Package (APK) along with other
resources. With Java, if you are aware of object-oriented programming principles, creating
applications for android will be much simpler than IOS app development.
21

XML on Android

Xml means Extensible Mark-up Language. Android provides a straightforward XML


vocabulary that corresponds to the View classes and subclasses. The goal of using Android's
XML vocabulary is to quickly design UI layouts and the screen elements they contain, in the
same way that creating web pages in HTML with a series of nested elements.
The Android platform is an open source mobile development
platform. It gives you access to all aspects of the mobile device that it runs on, from low level
graphics, to hardware like the camera on a phone. With so many things possible using
Android, you might wonder why you need to bother with XML. It is not that working with
XML is so interesting; it is working with the things that it enables. XML is commonly used
as a data format on the Internet. If you want to access data from the Internet, chances are that
the data will be in the form of XML.

Intent:
An activity can of course start another one, even if it but to do this, it will need a special
object called Intent. Intent is basis description of an operation to be performed. It can launch
an Activity, send a broadcast Intent to any interested Broadcast Receiver components, and
communicate with a background Service. Intent performs binding between the codes in
different applications. It can be thought of as the link between activities. It is possible to add
some informations to an Intent, thanks to an object called bundle that you add to the intent
thanks to the method:
Intent.putExtras(Bundle objectbunble );

Android Manifest:
AndroidManifest.xml file is necessary for all android applications and must have this name in
its root directory. In the manifest you can find essential information about the application for
the Android system, informations that the system must have before it can run any of the
application's code. Here is what you can find in the Android manifest:
-The name of the Java package for the application. The package name serves as a unique
identifier for the application.
-The description of the components of the application: the activities, services, broadcast
receivers, and content providers that the application is composed of and under what
conditions they can be launched.
-The processes that will host application components.
-The permissions the application must have in order to access protected parts of the API and
interact with other applications.
-The permissions that others are required to have in order to interact with the applications
components.
22

-The minimum level of the Android API that the application requires.
-The list of the libraries that the application must be linked against.

IDE for Android

Android Studio is a new Android development environment based on IntelliJ IDEA. It


provides new features and improvements over Eclipse ADT and will be the official Android
IDE once it's ready. On top of the capabilities you expect from IntelliJ, Android Studio
offers:

Flexible Gradle-based build system


Build variants and multiple APK generation.
Expanded template support for Google Services and various device types.
Rich layout editor with support for theme editing.
Lint tools to catch performance, usability, version compatibility, and other
problems.
Pro-Guard and app-signing capabilities.
Built-in support for Google Cloud Platform, making it easy to integrate
Google Cloud Messaging and App Engine.

SQLite for databases

SQLite is an in-process library that implements a self-contained, server less, zeroconfiguration, transactional SQL database engine. It is the one database, which is zeroconfigured, that means like other database you do not need to configure it in your system.
SQLite engine is not a standalone process like other databases; you can link it statically or
dynamically as per your requirement with your application. The SQLite accesses its storage
files directly.
Android provides several ways to store user and app data. SQLite is one way of storing user
data. SQLite is a very light weight database which comes with Android OS. In this tutorial
Ill be discussing how to write classes to handle all SQLite operations.

SQLite does not require a separate server process or system to operate


(server less).
SQLite comes with zero-configuration, which means no setup or
administration needed.
A complete SQLite database is stored in a single cross-platform disk file.
SQLite is very small and light weight, less than 400KiB fully configured
or less than 250KiB with optional features omitted.
SQLite is self-contained, which means no external dependencies.
SQLite transactions are fully ACID-compliant, allowing safe access from
multiple processes or threads.
SQLite supports most of the query language features found in the SQL92
(SQL2) standard.
23

SQLite is written in ANSI-C and provides simple and easy-to-use APl.

To use a database, we will create a class called Helper. This class will allow us to manipulate
the database from any other class that has instantiated the object Helper. This class has
elements and methods very specific. First specific objects: A SQLite database and a class
called openHelper that we will also create.
private SQLiteDatabase db;
OpenHelper openHelper = new OpenHelper(this.context);
this.db = openHelper.getWritableDatabase();
The class OpenHelper extends SQLiteOpenHelper. This class is used to actually create one
table or several tables in a database, and fill the table in the moment of its creation, all this in
the method onCreate (). this class allows to update the version of the table with the method
onUpgrade (). The method OnCreate will be called only once, after that the table is created
this method will no longer serve. For the class Helper, you can add all the methods used to
select, add, edit or delete entries in the table.

Access to Web Services (JSON)

Web service is software functionality that can be invoked through the internet using common
protocols:

like a remote function(s) you can call by contacting a program on a web


server
many web services accept parameters and produce results
can be written in PHP and contacted by the browser in HTML and/or Ajax
code
service's output might be HTML but could be text, XML, JSON or other
content

The ability to describe sets of data in JSON format is a natural extension to the JavaScript
language. Service Now supports a web service interface that operates on the JSON object as
the data input and output format.
The JSON web service is provided by a platform-level processor similar to the services for
SOAP, WSDL, CSV, Excel, and XML. Like those services, the JSON service is triggered by
the standalone JSON URL parameter.

E-draw Max for diagrams

E-draw Max enables students, teachers and business professionals to reliably create and
publish various kinds of diagrams to represent any ideas. E-draw Max is an all-in-one
diagram software that makes it simple to create professional-looking flowcharts,
organizational charts, network diagrams, business presentations, building plans, mind maps,
science illustration, fashion designs, UML diagrams, workflows, program structures, web
24

design diagrams, electrical engineering diagrams, directional maps, database diagrams and
more.

SQLite browser

DB Browser for SQLite is a light GUI editor for SQLite databases, built on top of Qt. The
main goal of the project is to allow non-technical users to create, modify and edit SQLite
databases using a set of wizards and a spread sheet-like interface.

Specific Requirements

Software Requirements
For developing the application the following are the Software Requirements:
Operating System: Windows 8
Language: SDK, Java
Tools: Android Studio
Technologies used: Java, XML.
Debugger: Android Dalvik Debug Monitor service For running the application the following
are the Software Requirements:
Operating System: Android 2.4.1 or higher versions
Network: Wi-Fi Internet or cellular Network 3
Tools: Different APIs and JSON data

Hardware Requirements
For developing the application the following are the Hardware Requirements:
Processor: Adreno or higher
RAM: 256 MB
Space on disk: minimum 512MB For running the application:
Device: Android version 2.4.1 and higher
Minimum space to execute: 8.0MB

25

5. DESIGN
Design is the first step into the development phase for any engineered product or system.
Design is a creative process. A good design is the key to effective system. The term "design"
is defined as "the process of applying various techniques and principles for the purpose of
defining a process or a system in sufficient detail to permit its physical realization".

Data Flow Diagram (DFD)

Notation Used

Process

A function is represented using a circle. This sign is called a process


or a bubble. Bubbles are annotated with the names of the corresponding
functions.

External Entity

An external entity such as a librarian, a library member, etc. is


represented by a rectangle. The external entities are essentially
those physical entities which is external to the software system
that interact with the system by inputting data to the system or by consuming the data
produced by the system. In addition to the human users, the external entity symbols can be
used to represent external hardware and software such as application software.

Data Flow

A directed arc or an arrow is used as a data flow sign. A data flow sign represents the data
flow occurring between two processes, or between an external entity and a process, in the
direction of the data flow arrow. Data flow signs are usually annotated with the
corresponding data names.

Data Store

26

A data store represents a logical file. It is represented using two parallel lines. A logical file
can represent either a data store sign, which can represent either a data structure, or a physical
file on disk. Each data store is connected to a process by means of a data flow sign. The
direction of the data flow arrow shows whether data is being read from or written into a data
store. A arrow flowing in or out of a data store implicitly represents the entire data of the data
store and hence connecting to a data store need not be annotated with the name of the
corresponding data items.

Content Level DFD:

0 Level DFD

A 0 level DFD defines the boundary between the system and outer environment. Such
diagrams represent the system at the center with no details of its interior structure. The main
objective of this diagram is to focus attention on external factors and events that are
important during development of a set of system requirements.

27

Data flow diagram (level 1)

This shows the system divides into sub systems each of which deals with one or more of the
data flow or form an external agent and which together provide all of the functionality of the
system as a whole.

Registration Module:

28

Search Module:

Share Module:

29

Rate Us Module:

Feedback

30

Over all DFD

31

E-R DIAGRAM

For Blood Donor to add Detail:

Weight

Blood Group

Blood Group

City

Name

Sex

Stored

Donor

Blood Seeker

Age

Age

Phone no.

City

Blood

Blood Group

Weight

City
Name

Sex

32

Phone no.

Table Structure:

33

6. TESTING
Software testing is an investigation conducted to provide information about the quality of
the product or service under test. Software testing can also provide an objective, independent
view of the software to allow the business to appreciate and understand the risks at the
software implementation. Software testing is any activity aimed at evaluating an attribute or
capability of a program or system and determining that it meets its required results. Software
Testing is the process of executing a program or system with the intent of finding errors.
Software testing can also be stated as the process of validating and Adding that a software
program/application/product. Testing Objectives:
The main objectives of testing is to uncoCase a host of errors, systematically and with
minimum effort ant time, starting formally, we can say,

Testing is the process of executing a program with the intent of finding errors.
A successful test is one that uncoCases an as yet of finding errors.
A good test case is one that has a high probability of finding errors, if it exits.
The tests are independent to detect possible errors.
The software more or less confirms to the quality and reliable standards.

Functional Testing

Functional Testing also called behavioral testing focuses on the functional


requirements of the software. That is, it enables the software engineer to
derived sets of input conditions that will fully exercise all functional
requirements for a program. Black Box Testing is a testing strategy, which
does not need any knowledge of internal design or code etc. As the name
"black box" suggests, no knowledge of internal logic or code structure is
required. The types of testing under this strategy are totally based/focused on
the testing for requirements and functionality of the work product/software
application. It attempts to find errors in the following categories:
Incorrect or missing functions
Interface errors
Errors in data structures or external data base access
Behavior or performance errors

34

Structural Testing

Structural Testing, also called glass-box testing, is a test case design


philosophy that uses the control structure described as part of component level design to
derive test cases. Structural testing strategy deals with the internal logic and structure of
the code. This testing is also called as glass, structural, open box or clears box testing. In
order to implement white box testing, the tester has to deal with the code and hence is
needed to possess knowledge of coding and logic i.e. internal working of the code. White
box test also needs the tester to look into the code and find out which
unit/statement/chunk of the codes malfunctioning. Using white-box testing methods, one
can derive test cases that:

Guarantee that all independent paths within a module have been exercised at least
once.
Exercise all logical decisions on their true and false sides.

Unit Testing

A Unit is the small testable piece of software that can be compiled for example functions,
procedures, classes, and interface. It is generally written by the programmer and is done after
coding Rigorous use of unit tests helps catch defects prior to customer testing and minimizes
the cost of correcting defects by identifying them when they are the cheapest to fix. In
computer programming, a unit test is a procedure used to validate that a particular module of
source code is working properly. The procedure is to write test cases for all functions and
methods so that whenever a change causes a regression, it can be quickly identified and fixed.
Unit testing focuses verification effort on the smallest unit of software design-the software
component or module. Using the component-level design description as a guide, important
control paths are tested to uncover errors within the boundary of the module. The relative
complexity of tests and the errors those tests uncover is limited by constrained scope
established for unit testing. The unit test focuses on the internal processing logic and data
structures within the boundaries of a component. This type of testing can be conducted in
parallel for multiple components.

Integration Testing

It is a systematic technique for constructing the software architecture while at the same time
conducting tests to uncover errors interfacing. The objective is to take unit tested components
and build a program structure that has been dictated by design. It is the testing phase, in
which whole project developed in J2EE will be tested with integrating it with the various
modules for the correct functionality. If working fine, then it will be integrated together with
the other modules for purpose of creation of the whole System.

35

System Testing

It is a series of different tests whose primary purpose is to fully exercise the computer-based
system. Although each test has a different purpose, all work to verify that system elements
have been properly integrated and performed allocated functions. It is the type of testing in
which all the modules are integrated together to form the whole system, then this whole
system is tested against various efficiency based tests, that also test the accuracy of the
system, working as a whole.

Acceptance Testing

This testing is performed with realistic data of the user to demonstrate that the software is
working satisfactory. Testing here focuses on the external behavior of the system, the internal
logic of the program is not emphasized. Unlike the other test phases, an objective of
acceptance testing is not to actively look for faults.
(a) Alpha Testing: Alpha testing is testing of an application when development is about to
complete. Minor design changes can still be made as a result of alpha testing. Alpha testing is
typically performed by a group that is independent of the design team, but still within the
company, e.g. in-house software test engineers, or software QA engineers.
(b) Beta Testing: Beta testing is testing of an application when development and testing are
essentially completed and final bugs and problems need to be found before the final release.
Beta testing is typically performed by end-users or others, not programmers, software
engineers or test engineers.

36

7. TEST CASES OF PROJECT


MODULE-1
Registration
Field Name

Invalid Classes

Valid Classes

Name

Empty name

Text containing
alphabet

only

Age

Empty age

Text containing
number

only

Weight

Empty Weight

Text containing
number

only

Contact

Alphabet or any special Any 10 digit number


character

Test Case ID

Description

Expected
Output

TCReg01

Click
Submit
button
with
empty
fields

Message is PASS
Message
should be shown to fill
all the fields
displayed
fill all the
fields

TCReg02

Click
Submit
button with
empty name
field

Message
should
be
displayed to
fill the name
fields

Message is PASS
shown to fill
the
name
fields

Click
Submit
button with
name field
containing
numbers or

Message
should
be
displayed to
fill the name
fields
correctly

Message is PASS
shown to fill
the
name
fields
correctly

TCReg02

37

Actual
Result

Remarks

special
character

TCReg04

Click
Input
Submit
accepted
button with
name field
containing
only
characters

is Input
accepted

is PASS

TCReg05

Click
Input
Submit
accepted
button with
name field
containing
space
between
characters

is Input
accepted

is PASS

TCReg06

Click
Submit
button with
contact field
containing
characters
other than
numbers

Message
Message is PASS
should
be displayed to
displayed to fill
the
fill
the number
number
fields
fields
correctly
correctly

TCReg07

Click
Submit
button with
contact field
containing
less than 10
digit number

Message
Message is PASS
should
be displayed to
displayed to fill
the
fill
the number
number
fields
fields
correctly
correctly

TCReg08

Click
Submit
button with
contact field
containing
greater10
digit number

Message
Message is PASS
should
be displayed to
displayed to fill
the
fill
the number
number
fields
fields
correctly
correctly

TCReg09

Click
Submit

Input should Input


accepted
accepted
38

is PASS

button with
contact field
containing
10
digit
number
TCReg10

Click
Message
Message is PASS
Submit
should
be shown to fill
button with displayed to the age fields
Age
field fill the age
empty
fields

TCReg11

Click
Submit
button with
age
field
containing
more than 2
digits

Message
should
be
displayed to
fill age less
than 70

Message is PASS
displayed to
fill age less
than 70

TCReg12

Click
Submit
button with
age
field
containing
age less than
17

Message
should
be
displayed
age should
be more than
17

Message is PASS
displayed
age should
be more than
17

TCReg13

Click
Message
Message is PASS
Submit
should
be shown to fill
button with displayed to the Weight
Weight field fill
the fields
empty
Weight
fields

TCReg14

Click
Submit
button with
Weight field
containing
value
less
than 50

Message
should
be
displayed
weight
should
be
more
than
50

TCReg15

Click
Submit
button
without

Message
Message is PASS
should
be displayed
displayed
select city
select city
39

Message is PASS
displayed
weight
should
be
more
than
50

selecting
city
TCReg16

Click
Submit
button
without
Internet
Connection

Message
should
be
displayed
Connection
Error

Message is PASS
displayed
Connection
Error

Test Case
ID

Description

Expected
Output

Actual
Result

TCSch16

Click
Search Icon
without
Internet
Connection

Message
should
be
displayed
Connection
Error

Message is PASS
displayed
Connectio
n Error

TCSch02

Click
Search Icon
without
Selecting
City

Message
should
be
displayed
Select City

Message is PASS
displayed
Select
City

TCSch03

Click
Search Icon
without
Selecting
Blood
Group

Message
should
be
displayed
Select Blood
Group

Message is PASS
displayed
Select
Blood
Group

Search

40

Remarks

8. IMPLIMENTATION

Implementation of the Project Implementation is the process of having system


personally checked out and put new equipment into use, trained users, installed the
new application and construct and file of data needed to use it. Depending on the size
of the organization that will be involved in using the application and the risk
associated with its users, system developers may choose to pilot (test) the operation in
only one area of the firm, say in one department or with only one or two persons.
Regardless of the implementation strategy use, developers strive to ensure that the
systems initial use in trouble. Once installed, applications are often used for many
years. However, both the organization and the user will change, and the environment
will be different over weeks and months. Therefore, the application will undoubtedly
have to be maintained, modifications and change will be made to softwares, file or
procedures to meet emerging user requirement. In the sense, Implementation is an ongoing process.

Following activities will be performed for implementation:

Study Requirements and Design document.


Decide methodology of development.
Select and customize coding standards.
Develop units.
Code.
Self-test will be done before submitting it to Code.
Review.
Code review will be done by peers, by the method of walkthrough.
Unit test by test engineers.
Integration of components.
Integration testing.
Preparation of Installable.
Release to testing team.
Outputs.
Integrated and tested units.
Peer Review.
Defect List.

Conversion Plan
The Conversion Plan describes the strategies involved in converting data from an
existing system to another hardware or software environment. It is appropriate to
re-examine the original systems functional requirements for the condition of the
system before conversion to determine if the original requirements are still valid.
Various Types of conversion are as follows: Intra language conversion is a conversion between different versions of the same
computer language or different versions of a software system, such as a database
41

management system (DBMS), operating system, or local area network (LAN)


management system.
Inter language conversion is the conversion from one computer language to
another or from one software system to another.
Same compiler conversions use the same language and compiler versions.
Typically, these conversions are performed to make programs conform to
standards, improve program performance, convert to a new system concept, etc.
These conversions may require some program redesign and generally require
some reprogramming.

Post Implementation and Software Maintenance


Software Maintenance is the last part of the System Development Life Cycle which is
actually the implementation of the post-implementation review plan. Software maintenance is
a very broad activity that includes error corrections, enhancements of capabilities, deletion of
obsolete capabilities, and optimization. Because change is inevitable, mechanism must be
developed for evaluation, controlling and making modifications. There are four types of
maintenance:

Corrective Maintenance
Adaptive Maintenance
Perfective Maintenance
Preventive Maintenance

When this system is installed it is used for long period. The average life of a system is 4 to 6
years and maximum used for 10 years. However, this period of use brings with it the need to
continually maintain the system, but this system can be modified and new technologies can
be used which are prevalent in market at that period of time. Software maintenance requires
an accurate maintenance plan to be prepared during the software development. It should
specify how users will request modifications or report problems. The budget should include
resource and cost estimates. A new decision should be addressed for the developing of every
new system feature and its quality objectives. Software maintenance takes more effort than
all other phases of software life cycle, but it has not been given as much importance as it
deserved. It is an admitted fact that approximately 60 to 70% effort is spent on maintenance
phase of software development life cycle.

42

9. PROJECT LEGACY
CURRENT STATUS OF THE PROJECT
The Designing phase has been almost completed of the project which consists of following
modules. The different modules of the project are:

Blood Donor Module.


Blood Seeker Module.

In User Module, Anonymous user can visit all the links like adding, viewing, of the Blood
Donor. In the Register User module, new Donor can be added by Registration and get access
to another Donor detail and contact that person.
The Donor cannot register other. Only that person is too added in this application which is
above 18 year or up to 60 year. User can install this app in their phone and easily search the
blood Donor detail in case of emergency.

FUTURE SCOPE AND ENHANCEMENT

This website could be created to access all the data available on server side.
Call Facility Could is included when any person search the blood Donor.
Analysis module can to create to determine the location of the Donor.
Increase the efficiency to search the blood.
Web services can be enhanced to collect more information of project.

TECHNICAL SKILL LEARN

We have learnt XML, Core Java.


Android Mobile operating system development.
In SQL-Server database, we have learned about Normalizing Data, Query
handling and some new features of SQLServer.
Working back-end database on web server.
In managerial Skills, we have learned about works, Group effort and Coordination
in group, and the way to work on the Live Projects.

43

10. User manual: A complete document of the app

44

45

46

47

48

11. Source code Activities in the Project

MainActivity.java
BloodBank.java
DrawerItemCustomAdapter.java
Home.java
Registration.java
Benefit.java
Fraghome.java
AboutUs.java
Share.java
Rate_Us.java
Contact.java
Feedback.java
Search.java
Custom_Values.java
ObjectDrawitem.java
JSONfunctions.java
Final.java

XML Layout Code:


1) Splash Screen
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:background="@drawable/splash"
android:orientation="vertical">
<ImageView
android:layout_width="300dp"
android:layout_height="400dp"
/>
</LinearLayout>
49

2) Blood Bank Screen:


<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>

<FrameLayout

50

android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

></FrameLayout>

</LinearLayout>
</TabHost>

<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>

51

3) Registration Screen
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/drop"
android:orientation="vertical" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:text="Name:/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="italic"
android:inputType="textPersonName"
android:id="@+id/name"
android:textSize="20dp"/>
52

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:orientation="horizontal">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numeric="integer"
android:text="Age: "
android:textSize="20dp"
android:textStyle="italic" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/age"
android:textStyle="italic"
android:inputType="number"
android:textSize="20dp"/>
</LinearLayout>

53

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:inputType="number"
android:text="Weight"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/weight"
android:textStyle="italic"
android:inputType="number"
android:textSize="20dp"/>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="2dp"
android:orientation="horizontal">
54

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:text="Blood Group: "/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="50dp"
android:id="@+id/bg"
android:textStyle="italic"
android:textSize="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-10dp"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:text="Sex: "/>
<Spinner
android:layout_width="wrap_content"
55

android:layout_height="50dp"
android:id="@+id/sex"
android:textStyle="italic"
android:textSize="20dp"/>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="-10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:text="Contact no.: "/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/phone"
android:textStyle="italic"
android:inputType="number"
android:textSize="20dp"/>
</LinearLayout>
56

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="italic"
android:text="City: "
/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="50dp"
android:id="@+id/city"
android:textStyle="italic"/>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="100dp">

57

<Button
android:id="@+id/reg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30dp"
android:text="Submit"/>
</LinearLayout>
</LinearLayout>
Search Screen
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical">
<ListView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/lst_srch">

</ListView>
</LinearLayout>

4) Home Screen

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="2"
58

android:orientation="vertical" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1.4"
android:layout_marginTop="10dp">
<ViewFlipper
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/flip"
>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/first"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/second"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/third"/>
<ImageView
android:layout_width="fill_parent"
59

android:layout_height="fill_parent"
android:background="@drawable/fourth"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/fifth"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/sixth"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/seventh"/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/eighth"/>
</ViewFlipper>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="0.6"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
60

android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:orientation="vertical">
<Spinner
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/city"/>
<Spinner
android:layout_marginLeft="110dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/bgroup"/>
<Button
android:id="@+id/search"
android:layout_width="60dp"
android:layout_height="30dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="190dp"
android:background="@drawable/search"/>

</RelativeLayout>
</LinearLayout>

</LinearLayout>
61

5) Rate Us:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="horizontal"
android:background="@drawable/search"
>
<RatingBar
android:id="@+id/rat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"/>
<Button
android:id="@+id/click"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:textSize="20dp"
android:layout_marginTop="50dp"
android:text="Rate"
/>
</LinearLayout>

6) Contact Us
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
62

android:layout_marginTop="50dp"
android:background="@drawable/drop"
android:orientation="vertical">

<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="90dp"
android:textSize="20dp"
android:text="CONTACT US"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:textSize="20dp"
android:text="Feel free to email Contact us, ask your queries."/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:layout_marginLeft="30dp"
android:textSize="15dp"
android:layout_marginTop="20dp"
android:text="veena.thakur.thakur07@gmail.com,"/>

<TextView
63

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:textSize="15dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="30dp"
android:text=" thakurpreeti390@gmail.com,"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:textSize="15dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="30dp"
android:text="manpreetsingh2111@gmail.com,"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:textSize="15dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="30dp"
android:text="hardeepgillmh1@gmail.com"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
64

android:layout_marginLeft="20dp"
android:inputType="number"
android:textSize="15dp"
android:layout_marginTop="20dp"
android:text="8591222522,9988279174"/>

</LinearLayout>

7) Tabs:
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabHost

android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

65

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

></FrameLayout>

</LinearLayout>
</TabHost>

<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
66

android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>

8) About us:
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/fback" >
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:textSize="20dp"
android:text="The Blood Bank system is developed so that users can
view the information about registered blood donors such as name, address, and
other such personal information along with their details of blood group and
other medical information of donor. This project requires internet access and
thus there is a disadvantage of internet failure."/>
67

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="50dp"
android:text="The Blood you donate gives someone another chance at
life. One day that someone may be a close relative, a friend, a loved one-or
even you."
android:textSize="20dp" />

<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:textSize="20dp"
android:text="At 18 you grow up. At 18 you drive. At 18 you give Blood
to keep someone alive."/>
</LinearLayout>
</ScrollView>

68

9) Feedback:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginLeft="30dp"
android:text="hvgxfgv"/>
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Excellent"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Good"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
69

android:text="Average"/>
</RadioGroup>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginLeft="30dp"
android:textSize="20dp"
android:text="Any Suggestion"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textMultiLine"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginLeft="70dp"
android:text="Finish"/>
</LinearLayout>

70

JAVA Source Code


1. Blood Bank Activity:
package com.example.bloodbank;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class BloodBank extends TabActivity {


// declare properties
private String[] mNavigationDrawerItemTitles;
private DrawerLayout mDrawerLayout;
private ListView mDrawerList;
71

private ActionBarDrawerToggle mDrawerToggle;

// nav drawer title


private CharSequence mDrawerTitle;

// used to store app title


private CharSequence mTitle;

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bloodbank);
// for proper titles
TabHost tabHost=getTabHost();
TabSpec hometab=tabHost.newTabSpec("Search");

hometab.setIndicator("Search",getResources().getDrawable(R.drawable.ic_launcher));
Intent photoIntent=new Intent(this,Home.class);
hometab.setContent(photoIntent);

TabSpec regitab=tabHost.newTabSpec("Registration");

regitab.setIndicator("Registration",getResources().getDrawable(R.drawable.ic_launcher));
Intent songIntent=new Intent(this,Registration.class);
72

regitab.setContent(songIntent);
tabHost.addTab(hometab);
tabHost.addTab(regitab);
//Set Fragmentation Title
mTitle = mDrawerTitle = getTitle();
// initialize properties
mNavigationDrawerItemTitles
getResources().getStringArray(R.array.navigation_drawer_items_array);

mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);


mDrawerList = (ListView) findViewById(R.id.left_drawer);
// list the drawer items
ObjectDrawitem[] drawerItem = new ObjectDrawitem[8];
drawerItem[0] = new ObjectDrawitem(R.drawable.home, "Home");
drawerItem[1] = new ObjectDrawitem(R.drawable.facts, "Facts");
drawerItem[2] = new ObjectDrawitem(R.drawable.benefits, "Benefits");
drawerItem[3] = new ObjectDrawitem(R.drawable.share, "Share");
drawerItem[4] = new ObjectDrawitem(R.drawable.contact, "Contact
Us");
drawerItem[5]

new

ObjectDrawitem(R.drawable.feedback,

"Feedback");
drawerItem[6] = new ObjectDrawitem(R.drawable.rate, "Rate Us");
drawerItem[7] = new ObjectDrawitem(R.drawable.about, "About");

// Pass the folderData to our ListView adapter


DrawerItemCustomAdapter
adapter
=
DrawerItemCustomAdapter(this, R.layout.listview_item_row, drawerItem);

// Set the adapter for the list view

73

new

mDrawerList.setAdapter(adapter);
android.app.FragmentTransaction
getFragmentManager().beginTransaction();

mFragmentTransaction

mFragmentTransaction.addToBackStack(null);
// set the item click listener
mDrawerList.setOnItemClickListener(new DrawerItemClickListener())
// for app icon control for nav drawer
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(
this,

/* host Activity */

mDrawerLayout,

/* DrawerLayout object */

R.drawable.ic_drawer, /* nav drawer icon to replace 'Up' caret */


R.string.drawer_open, /* "open drawer" description */
R.string.drawer_close /* "close drawer" description */
){
/** Called when a drawer has settled in a completely closed state. */
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onDrawerClosed(View view) {
super.onDrawerClosed(view);
getActionBar().setTitle(mTitle);
}
/** Called when a drawer has settled in a completely open state. */
@SuppressLint("NewApi")
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
getActionBar().setTitle(mDrawerTitle);
}

74

}
// Set the drawer toggle as the DrawerListener
mDrawerLayout.setDrawerListener(mDrawerToggle);
// enable ActionBar app icon to behave as action to toggle nav drawer
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setHomeButtonEnabled(true);
if (savedInstanceState == null) {
// on first time display view for first nav item
selectItem(0);
}
}@Override
public boolean onOptionsItemSelected(MenuItem item) {
// The action bar home/up action should open or close the drawer.
// ActionBarDrawerToggle will take care of this.
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
return super.onOptionsItemSelected(item);
}
// to change up caret
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Sync the toggle state after onRestoreInstanceState has occurred.
mDrawerToggle.syncState();
}
// navigation drawer click listener
75

private class DrawerItemClickListener implements ListView.OnItemClickListener {

@Override
public void onItemClick(AdapterView<?> parent, View view, int
position, long id) {
selectItem(position);
}
}
private void selectItem(int position) {
// update the main content by replacing fragments
Fragment fragment = null:
switch (position) {
case 0:
fragment = new Fraghome();
break;
case 1:
fragment = new Facts();
break;
case 2:
fragment = new Benefit();
break;
case 3:
fragment = new Share();
break;
case 4:
fragment = new Contect();
break;
case 5:
76

fragment = new FeedBack();


break;
case 6:
fragment = new Rate_Us();
break;
case 7:
fragment = new AboutUs();
break;
default:
break;
}
if (fragment != null) {
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame,
fragment).commit();
// update selected item and title, then close the drawer
mDrawerList.setItemChecked(position, true);
mDrawerList.setSelection(position);
setTitle(mNavigationDrawerItemTitles[position]);
mDrawerLayout.closeDrawer(mDrawerList);

} else {
// error in creating fragment
Log.e("MainActivity", "Error in creating fragment");
}
}

77

@Override
public void setTitle(CharSequence title) {
mTitle = title;
getActionBar().setTitle(mTitle);
}
@Override
public void onBackPressed() {
if (getFragmentManager().getBackStackEntryCount() == 0) {
this.finish();
Intent back=new Intent(this,BloodBank.class);
startActivity(back);
} else {
getFragmentManager().popBackStack();
}
}
}

78

2. Home Activity:
package com.example.bloodbank;
import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;
import android.widget.ViewFlipper;

public class Home extends Activity{


Button search;
ViewFlipper flip;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home);

final Spinner spbg=(Spinner)findViewById(R.id.bgroup);


79

final String[] bloodgroup={"A+","A-","B+","B-","O+","O-","AB+","AB-"};


ArrayAdapter<String> adptr=new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line,bloodgroup);
spbg.setAdapter(adptr);
spbg.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
String group=spbg.getItemAtPosition(arg2).toString();
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
final Spinner spcty=(Spinner)findViewById(R.id.city);
final String[] city = {"Select","Abohar","Adilabad","Adilabad",
"Adityapur","Agartala", "Agra", "Agra
Contonment","Ahmadnagar","Ahmedabad","Aizawl","Ajmer","Akola",
"Alandur","Alappuzha",
"Aligarh","Alipurduar","Allahabad","Alwal","Amalapuram","Ambala","AmbalaCantonment
","Ambala
Sadar","Ambarnath","Ambattur","Ambikapur","Amravati","Amreli","Amritsar","Amroha,"A
nand","Anantnag",
"Anklesvar","Ara","Arakonam","AsansoIMC","Aurangabad","Avadi","Azamgarh",
"Badlapur",
"Bagalkot""Bahadurgarh","Baharampore","Bahraich","Balaghat","Balangir","Baleshwar",
"Ballia","Balurghat","Bangalore","Bankura","Banswara","Baramati","Baramula","Barasat","
Baraut","Bardhaman","Bardoli","Bareilly","Bareilly","Bargarh","Baripada","Barmer","Barna
la","Barrackpore","Baruipur","Basti","Batala","Bathinda","Beawar","Begusarai","Behta
Hajipur","Belgaum", "Bellary
,"Bettiah","Betul","Bhadrak","Bhagalpur","Bhandara","Bharatpur","Bharatpur","Bharuch","
80

Bhavnagar","Bhilai","Bhilwara","Bhimavaram","Bhiwandi","Bhiwani","Bhopal","Bhubanes
war","Bhuj","Bhusawal","Bidar","Bihar","Bijapur","Bijnor","Bikaner","Bilaspur","Bokaro
Steel City","Bolpur",
"Bommanahalli","Bongaigaon","Bongaon","Brahmapur","Bulandshahr","Byatarayanapura","
Chandigarh","Chandrapur","Changanacheri","Chapara","Chengalpattu","Chennai","Cherthal
a","Chhindwara","Chidambaram","Chikmagalur","Chitradurga","Chittaurgarh","Chittoor","C
huru","Coimbatore","Coonoor","Cuddapah","Cuttack","dadri","Daman","Darbhanga","Dava
nagere","Dehra Dun","Delhi",
"Deoghar","Deoira","Dewas","Dhanbad","Dharmapuri","Dhenkanal","Dhule","Dibrugarh","
Dimapur", "Dindigul","Dispur","Dombivali","Dum
Dum","DurgBhilainagar","DurgapurMC","Edathala","Eluru",
"Erode","Etawah","Faizabad","Faridabad","Faridkot","Farrukhabad","Fatehabad","Fazilka","
Firozabad","Firozpur","Gadag","Gaddiannaram","Gajukwaka","Gandhidham","Gandhinagar
","Ganganagar","Gangtok","Gaya","Ghatlodiya","Ghaziabad","Ghazipur","Giridih","Gobich
ettipalayam","Gobindgarh","Godhra","Gonda","Gondia","Gorakhpur","Gulbarga","guna","G
untur","Gurdaspur","Gurgaon","Guruayur","Guwahati","Gwalior","Habra","Hajipur","Haldia
","Haldwani","Hansi","Hanumangarh","Hapur",
"Hardwar","Hassan","Hathras","Hazaribagh","Himatnagar","Hissar","Hooghly_Chinsurah","
Hoshangabad","Hoshiarpur","Hospet","Hosur","Howrah","Hubli","Hyderabad","Ichalkaranji
","Imphal","Indore","Itanagar","Jabalpur","JabalpurCantonment","Jagadhri","Jagdalpur","Jag
raon","Jaipur","Jaisalmer","Jalandhar","Jalgaon","Jalna","Jalpaiguri","Jammu","Jamnagar","J
amshedpur","Jaunpur","Jhansi","Jharsuguda","Jhunjhunun","Jind","Jodhpur","Jorhat","Junag
adh","Kaithal","Kakinada","Kalamassery","Kalyan","Kalyani","Kanchipuram","Kannur","Ka
npur","Kanpur
Cantonment","Kapurthala","Karad","Karaikal","Karaikkudi","Karimnagar","Karnal","Karur"
,"Karwar","Kasaragod","Kashipur","Kathua","Katihar","Kavaratti","Kayamkulam","Khamm
an","Khandwa","Khanna","Kharagpur","Khopoli","Kochi","Kodungallur","Kolar","Kolhapur
","Kolkata","Kollam","Korba","KotKapura","Kota","Kottyam","Kozhikode","Krishnagiri","
Krishnanagar","Krishnarajapura","Kukatpalle","Kullu","Kumbakonam","Kurnool","Kuruksh
etra","Lakhimpur","Lalbahadur Nagar","Latur", "Lonavale","Lucknow","Lucknow
Cantonment","Ludhiana","Machilipatnam","Madavaram", "Madgaon",
"Madurai","Mahadevapura","Mahbubnagar","Mahesana","Malappuram","Malegaon" ,"Maler
Kotla","Malkajgiri","Malout","Mancherial","Mandi","Mandi Dabwali","Mandsaur",
"Mandya","Mangalore","Mango","Manjeri","Mansa","Mathura","Mayiladuthurai","Medinipu
r","Meerut","Meerut Cantonment","Mira
Bhayandar","Mirzapur","Modinagar","Moga","Mohali", "Moradabad",
"Morbi","Mormugao","Motihari","Muktsar","Mumbai","Murshidabad",
"Muzaffarnagar","Muzaffarpur","Mysore","Nabha","Nadiad","Nagaon","Nagapattinam","Na
gaur","Nagercoil","Nagpur","Nalasopara","Nalgonda","Namakkal","Nanded","Nandyal","Na
rnaul","Nashik","Navi
Mumbai","Navsari","Nedumangad","Nellore","Neyveli","Nizambad","Noida","Old
Malda","Ongole","Ozhukarai","Palakkad","Palanpur","Palghar","Pali","Palwal","Panaji","Pa
nchkula","Panipat","Panvel","Parbhani","Patan","Pathankot","Patiala","Patna","Phagwara","
Pilibhit","Pimpri-Chinchwad","Pollachi","Pondicherry","Porbandar","Port
81

Blair","Pudukkottai","Pune","Pune
Cantonemnt","Puri","Purnia","Purulia","Qutubullapur","Raebareli","Raichur","Raiganj","Rai
garh","Raipur","Rajahmundry","RajarhatGopalpore","Rajendranagar","Rajkot","Rajnandgaon","Rajpura"
,"Ramanathapuram","Ramgarh","Rampur","Ranaghat","Ranchi","Ranip","Ratlam","Ratnagir
i","Raurkela","Rewa","Rewari","Rishikesh","Rohtak","Roorkee","Rudrapur","S.A.S.
Nagar","Sagar", "Saharanpur", "Salem","Samastipur","Sambalpur","Sangli (Miraj)","Sangrur","Satara","Satna",
"Secunderabad","Seoni","Serampore","Serilingampalle","Shahdol","Shahjahanpur","Shamli"
,"Shillong","Shimla","Shimoga","Sibsagar","Sikar","Silchar","SiliguriM.C.","Silvassa","Sirh
ind","Sirsa","Sitapur","Sivakasi","Siwan","Solan","Solapur","Sonepat","South Dum
Dum","Srikakulam","Srinagar"
,"Sultanpur","Sunam","Surat","Surendranagar","Tambaram","Tamluk","Tanuku","Tarn
Taran","Tenali","Tenkasi","Tezpur","Thalassery","Thane","Thanesar","Thanjavur","Theni","
Thiruvananthapuram","Thrissur","Tindivanam","Tinsukia","Tiruchirappali","Tirunelveli","Ti
rupati","Tiruppur","Tirur","Tiruvalla","Tiruvannamalai","Tiruvottiyur","Tumkur","Udaipur",
"Udhagamandalam","Udhampur","Udupi","Ujjain","Ulhasnagar","Unnao","Uppal
Kalan","Vadakara","Vadodara","Valsad","Vapi",
"Varanasi","Vasai","Vejalpur","Vellore","Vidisha","Vijayawada","Viluppuram","Virar","Vir
udhunagar","Visakhpatnam","Vrindavan","Warangal","Wardha","Yamuna
Nagar","Yavatmal","Yelahanka", "Zira"};
ArrayAdapter<String> cityadptr=new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line,city);
spcty.setAdapter(cityadptr);
spcty.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
String name=spcty.getItemAtPosition(arg2).toString();
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
82

});
flip=(ViewFlipper)findViewById(R.id.flip);
search=(Button)findViewById(R.id.search);
search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
// get Connectivity Manager object to check connection
ConnectivityManager connec =

(ConnectivityManager)getSystemService(getBaseContext().CONNECTIVITY_SERVICE);

// Check for network connections


if
(
connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.CONNECTED ||

==

connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.CONNECTING ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.CONNECTING ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.CONNECTED ) {

==

// TODO Auto-generated method stub

Toast.makeText(getApplicationContext(),spbg.getSelectedItem().toString()+","
+spcty.getSelectedItem().toString() ,
Toast.LENGTH_LONG).show();
Intent
Intent(getApplicationContext(),Search.class);

searchobj=new

searchobj.putExtra("key_city",
spcty.getSelectedItem().toString());
searchobj.putExtra("key_bld",
spbg.getSelectedItem().toString());
83

startActivity(searchobj);
}
else if (
connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.DISCONNECTED ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.DISCONNECTED ) {

==

Toast.makeText(Home.this,
Toast.LENGTH_LONG).show();
}
}
});
flip.startFlipping();
}
}

84

"Connection

error",

3. Registration Activity:

package com.example.bloodbank;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.os.StrictMode;
import android.util.Log;
85

import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;

public class Registration extends Activity {


@SuppressLint("NewApi")

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.registration);
if (android.os.Build.VERSION.SDK_INT > 9) {
StrictMode.ThreadPolicy
policy
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
final Spinner bg=(Spinner)findViewById(R.id.bg);
final Spinner sex=(Spinner)findViewById(R.id.sex);

final Spinner spcty=(Spinner)findViewById(R.id.city);


final EditText ed_name =(EditText)findViewById(R.id.name);
final EditText ed_age=(EditText)findViewById(R.id.age);

86

new

final EditText ed_phone=(EditText)findViewById(R.id.phone);


final EditText ed_weight=(EditText)findViewById(R.id.weight);

final String[] category={"Male","Female"};


ArrayAdapter<String> adpt=new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line,category);

sex.setAdapter(adpt);
sex.setOnItemSelectedListener(new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
String group=sex.getItemAtPosition(arg2).toString();
}

@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub

}
});

87

final String[] bloodgroup={"A+","A-","B+","B-","O+","O-","AB+","AB-"};

ArrayAdapter<String>
adptr=new
ArrayAdapter<String>(this,
R.layout.support_simple_spinner_dropdown_item,bloodgroup);
bg.setAdapter(adptr);
bg.setOnItemSelectedListener(new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
String group=bg.getItemAtPosition(arg2).toString();
}

@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub

}
});

final String[] city = {"Select","Abohar","Adilabad","Adilabad", "Adityapur","Agartala",


"Agra", "Agra Contonment","Ahmadnagar","Ahmedabad","Aizawl","Ajmer","Akola",
"Alandur","Alappuzha",
"Aligarh","Alipurduar","Allahabad","Alwal","Amalapuram","Ambala","AmbalaCantonment
","Ambala
88

Sadar","Ambarnath","Ambattur","Ambikapur","Amravati","Amreli","Amritsar","Amroha,"A
nand","Anantnag",
"Anklesvar","Ara","Arakonam","AsansoIMC","Aurangabad","Avadi","Azamgarh",
"Badlapur",
"Bagalkot""Bahadurgarh","Baharampore","Bahraich","Balaghat","Balangir","Baleshwar",
"Ballia","Balurghat","Bangalore","Bankura","Banswara","Baramati","Baramula","Barasat","
Baraut","Bardhaman","Bardoli","Bareilly","Bareilly","Bargarh","Baripada","Barmer","Barna
la","Barrackpore","Baruipur","Basti","Batala","Bathinda","Beawar","Begusarai","Behta
Hajipur","Belgaum", "Bellary
,"Bettiah","Betul","Bhadrak","Bhagalpur","Bhandara","Bharatpur","Bharatpur","Bharuch","
Bhavnagar","Bhilai","Bhilwara","Bhimavaram","Bhiwandi","Bhiwani","Bhopal","Bhubanes
war","Bhuj","Bhusawal","Bidar","Bihar","Bijapur","Bijnor","Bikaner","Bilaspur","Bokaro
Steel City","Bolpur",
"Bommanahalli","Bongaigaon","Bongaon","Brahmapur","Bulandshahr","Byatarayanapura","
Chandigarh","Chandrapur","Changanacheri","Chapara","Chengalpattu","Chennai","Cherthal
a","Chhindwara","Chidambaram","Chikmagalur","Chitradurga","Chittaurgarh","Chittoor","C
huru","Coimbatore","Coonoor","Cuddapah","Cuttack","dadri","Daman","Darbhanga","Dava
nagere","Dehra Dun","Delhi",
"Deoghar","Deoira","Dewas","Dhanbad","Dharmapuri","Dhenkanal","Dhule","Dibrugarh","
Dimapur", "Dindigul","Dispur","Dombivali","Dum
Dum","DurgBhilainagar","DurgapurMC","Edathala","Eluru",
"Erode","Etawah","Faizabad","Faridabad","Faridkot","Farrukhabad","Fatehabad","Fazilka","
Firozabad","Firozpur","Gadag","Gaddiannaram","Gajukwaka","Gandhidham","Gandhinagar
","Ganganagar","Gangtok","Gaya","Ghatlodiya","Ghaziabad","Ghazipur","Giridih","Gobich
ettipalayam","Gobindgarh","Godhra","Gonda","Gondia","Gorakhpur","Gulbarga","guna","G
untur","Gurdaspur","Gurgaon","Guruayur","Guwahati","Gwalior","Habra","Hajipur","Haldia
","Haldwani","Hansi","Hanumangarh","Hapur",
"Hardwar","Hassan","Hathras","Hazaribagh","Himatnagar","Hissar","Hooghly_Chinsurah","
Hoshangabad","Hoshiarpur","Hospet","Hosur","Howrah","Hubli","Hyderabad","Ichalkaranji
","Imphal","Indore","Itanagar","Jabalpur","JabalpurCantonment","Jagadhri","Jagdalpur","Jag
raon","Jaipur","Jaisalmer","Jalandhar","Jalgaon","Jalna","Jalpaiguri","Jammu","Jamnagar","J
amshedpur","Jaunpur","Jhansi","Jharsuguda","Jhunjhunun","Jind","Jodhpur","Jorhat","Junag
adh","Kaithal","Kakinada","Kalamassery","Kalyan","Kalyani","Kanchipuram","Kannur","Ka
npur","Kanpur
Cantonment","Kapurthala","Karad","Karaikal","Karaikkudi","Karimnagar","Karnal","Karur"
,"Karwar","Kasaragod","Kashipur","Kathua","Katihar","Kavaratti","Kayamkulam","Khamm
an","Khandwa","Khanna","Kharagpur","Khopoli","Kochi","Kodungallur","Kolar","Kolhapur
","Kolkata","Kollam","Korba","KotKapura","Kota","Kottyam","Kozhikode","Krishnagiri","
Krishnanagar","Krishnarajapura","Kukatpalle","Kullu","Kumbakonam","Kurnool","Kuruksh
etra","Lakhimpur","Lalbahadur Nagar","Latur", "Lonavale","Lucknow","Lucknow
Cantonment","Ludhiana","Machilipatnam","Madavaram", "Madgaon",
"Madurai","Mahadevapura","Mahbubnagar","Mahesana","Malappuram","Malegaon" ,"Maler
Kotla","Malkajgiri","Malout","Mancherial","Mandi","Mandi Dabwali","Mandsaur",
"Mandya","Mangalore","Mango","Manjeri","Mansa","Mathura","Mayiladuthurai","Medinipu
89

r","Meerut","Meerut Cantonment","Mira
Bhayandar","Mirzapur","Modinagar","Moga","Mohali", "Moradabad",
"Morbi","Mormugao","Motihari","Muktsar","Mumbai","Murshidabad",
"Muzaffarnagar","Muzaffarpur","Mysore","Nabha","Nadiad","Nagaon","Nagapattinam","Na
gaur","Nagercoil","Nagpur","Nalasopara","Nalgonda","Namakkal","Nanded","Nandyal","Na
rnaul","Nashik","Navi
Mumbai","Navsari","Nedumangad","Nellore","Neyveli","Nizambad","Noida","Old
Malda","Ongole","Ozhukarai","Palakkad","Palanpur","Palghar","Pali","Palwal","Panaji","Pa
nchkula","Panipat","Panvel","Parbhani","Patan","Pathankot","Patiala","Patna","Phagwara","
Pilibhit","Pimpri-Chinchwad","Pollachi","Pondicherry","Porbandar","Port
Blair","Pudukkottai","Pune","Pune
Cantonemnt","Puri","Purnia","Purulia","Qutubullapur","Raebareli","Raichur","Raiganj","Rai
garh","Raipur","Rajahmundry","RajarhatGopalpore","Rajendranagar","Rajkot","Rajnandgaon","Rajpura"
,"Ramanathapuram","Ramgarh","Rampur","Ranaghat","Ranchi","Ranip","Ratlam","Ratnagir
i","Raurkela","Rewa","Rewari","Rishikesh","Rohtak","Roorkee","Rudrapur","S.A.S.
Nagar","Sagar", "Saharanpur", "Salem","Samastipur","Sambalpur","Sangli (Miraj)","Sangrur","Satara","Satna",
"Secunderabad","Seoni","Serampore","Serilingampalle","Shahdol","Shahjahanpur","Shamli"
,"Shillong","Shimla","Shimoga","Sibsagar","Sikar","Silchar","SiliguriM.C.","Silvassa","Sirh
ind","Sirsa","Sitapur","Sivakasi","Siwan","Solan","Solapur","Sonepat","South Dum
Dum","Srikakulam","Srinagar"
,"Sultanpur","Sunam","Surat","Surendranagar","Tambaram","Tamluk","Tanuku","Tarn
Taran","Tenali","Tenkasi","Tezpur","Thalassery","Thane","Thanesar","Thanjavur","Theni","
Thiruvananthapuram","Thrissur","Tindivanam","Tinsukia","Tiruchirappali","Tirunelveli","Ti
rupati","Tiruppur","Tirur","Tiruvalla","Tiruvannamalai","Tiruvottiyur","Tumkur","Udaipur",
"Udhagamandalam","Udhampur","Udupi","Ujjain","Ulhasnagar","Unnao","Uppal
Kalan","Vadakara","Vadodara","Valsad","Vapi",
"Varanasi","Vasai","Vejalpur","Vellore","Vidisha","Vijayawada","Viluppuram","Virar","Vir
udhunagar","Visakhpatnam","Vrindavan","Warangal","Wardha","Yamuna
Nagar","Yavatmal","Yelahanka", "Zira"};

ArrayAdapter<String> cityadptr=new ArrayAdapter<String>(this,


android.R.layout.simple_dropdown_item_1line,city);
spcty.setAdapter(cityadptr);
spcty.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
90

// TODO Auto-generated method stub


String name=spcty.getItemAtPosition(arg2).toString();
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
final Button addbtn=(Button)findViewById(R.id.reg);
addbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
String nm=ed_name.getText().toString();
String ag=ed_age.getText().toString();
String ph=ed_phone.getText().toString();
String wt=ed_weight.getText().toString();
String se=sex.getSelectedItem().toString();
String blood=bg.getSelectedItem().toString();
String city=spcty.getSelectedItem().toString();
//Toast.makeText(getApplicationContext(), nm+", " +ag+",
"+wt+", "+blood+", "+se+", "+ph+", "+city,Toast.LENGTH_LONG).show();
{
// get Connectivity Manager object to check connection
ConnectivityManager connec =

(ConnectivityManager)getSystemService(getBaseContext().CONNECTIVITY_SERVICE);

// Check for network connections


91

if
(
connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.CONNECTED ||

==

connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.CONNECTING ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.CONNECTING ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.CONNECTED ) {

==

if((nm.equals(""))&&(ag.equals(""))&&(ph.equals(""))&&(wt.equals("")))
{
Toast.makeText(getApplicationContext(), "Plz fill all
Fields", 1000).show();
}
else{
String
"http://oneinfonet.besaba.com/blood_save.php";

url

List params = new ArrayList();


params.add(new BasicNameValuePair("strA", nm));
params.add(new BasicNameValuePair("strB", ph));
params.add(new BasicNameValuePair("strC", blood));
params.add(new BasicNameValuePair("strD", ag));
params.add(new BasicNameValuePair("strE", se));
params.add(new BasicNameValuePair("strF", city));
params.add(new BasicNameValuePair("strG", wt));

@SuppressWarnings("unused")
String resultServer = getHttpPost(url,params);

92

Toast.makeText(Registration.this,
Toast.LENGTH_LONG).show();

"

Record

Saved...",

}
else if(
connec.getNetworkInfo(0).getState()
android.net.NetworkInfo.State.DISCONNECTED ||

==

connec.getNetworkInfo(1).getState()
android.net.NetworkInfo.State.DISCONNECTED ) {

==

Toast.makeText(Registration.this,
Toast.LENGTH_LONG).show();

"Connection

error",

}
}
}
});
}
public String getHttpPost(String url,List params) {
StringBuilder str = new StringBuilder();
HttpClient client = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
try {
httpPost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
HttpResponse response = client.execute(httpPost);
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode == 200) { // Status OK
HttpEntity entity = response.getEntity();
InputStream content = entity.getContent();

93

BufferedReader

reader

new

BufferedReader(new

InputStreamReader(content));
String line;
while ((line = reader.readLine()) != null) {
str.append(line);
}
} else {
Log.e("Log", "Failed to download result..");
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return str.toString();
}
}

94

4. Search Activity:

package com.example.bloodbank;
import java.util.ArrayList;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;
public class Search extends Activity {
//Declare Variables
JSONObject jsonobject;
JSONArray jsonarray;
ListView listview;
CustomValues adapter;
ProgressDialog mProgressDialog;
ArrayList<HashMap<String, String>> arraylist;
static String RANK = "Name";
static String COUNTRY = "phone";
static String weight = "weight";
static String POPULATION = "bloodgroup";
static String age = "age";
static String sex = "sex";
static String city = "city";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search);
// Execute DownloadJSON AsyncTask
new DownloadJSON().execute();
}
// DownloadJSON AsyncTask
private class DownloadJSON extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
super.onPreExecute();
// Create a progressdialog
95

mProgressDialog = new ProgressDialog(Search.this);


// Set progressdialog title
mProgressDialog.setTitle("Blood Donate");
// Set progressdialog message
mProgressDialog.setMessage("Loading...");
mProgressDialog.setIndeterminate(false);
// Show progressdialog
mProgressDialog.show();
}

@Override
protected Void doInBackground(Void... params) {
// Create an array
arraylist = new ArrayList<HashMap<String, String>>();
// Retrieve JSON Objects from the given URL address
jsonobject = JSONfunctions
.getJSONfromURL("http://oneinfonet.besaba.com/blood_get.php");
try {
// Locate the array name in JSON
jsonarray = jsonobject.getJSONArray("blood_array");
for (int i = 0; i < jsonarray.length(); i++) {
HashMap<String, String> map = new HashMap<String, String>();
jsonobject = jsonarray.getJSONObject(i);
// Retrive JSON Objects
map.put("Name", jsonobject.getString("name"));
map.put("phone", jsonobject.getString("phone"));
map.put("bloodgroup", jsonobject.getString("bloodgroup"));
map.put("age", jsonobject.getString("age"));
map.put("sex", jsonobject.getString("sex"));
map.put("city", jsonobject.getString("city"));
//map.put("flag", jsonobject.getString("flag"));
//Set the JSON Objects into the array
arraylist.add(map);
}
} catch (JSONException e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return null;
}

96

@Override
protected void onPostExecute(Void args) {
// Locate the listview in listview_main.xml
listview = (ListView) findViewById(R.id.lst_srch);
// Pass the results into ListViewAdapter.java
adapter = new CustomValues(Search.this, arraylist);
// Set the adapter to the ListView
listview.setAdapter(adapter);
Log.d("jsonarayaaaaaaaaaaaaaaaaaaaaaaaaaaaa", ""+arraylist);
// Close the progressdialog
mProgressDialog.dismiss();
}
}
//
listview=(ListView)findViewById(R.id.lst_srch);
//
Custom_Values adpter=new Custom_Values(Search.this,
donnernm,donnercity,donnerbg,donnersex);
//
listview.setAdapter(adpter);
//
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//
@Override
//
public void onItemClick(AdapterView<?> arg0, View arg1, int
position,
//
long arg3) {
//
// TODO Auto-generated method stub
//
Toast.makeText(getApplicationContext(), "You Click on
"+donnernm[+position], Toast.LENGTH_LONG).show();
//
}
//
});
//
}
//

97

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.search, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

98

12. Bibliography
Below the list of websites that we have gone through for the development of the application:
Internet:
a)
b)
c)
d)

http://androidsourcecode.blodspot.in/2010/10/android-reading-inbox-sms.html
www.vogella.com/tutorials/AndroidSQLite/article.html
www.codeproject.com/.../how-to-get-data-from-database-in-android
http://stackoverflow.com/questions/17794551/fetch-data-from-existing-sqlitedatabase

Various Books Followed:


a) Android Programming Guide for Beginners
b) Android Application development by OReally Publication
c) Android Recipes Apress by Dave Smith publication

99

100

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