Utilization of Mobile and Communication Technology For Geospatial Data Collection With Special Reference To Disaster Incident
Utilization of Mobile and Communication Technology For Geospatial Data Collection With Special Reference To Disaster Incident
Lin
Narasi ngha Kesara B andaral age Cham ira Lasantha
Karunarathne
GS &
28 MAY 2016
MSc 2016
ayewarde
Utilization of Mobile and Communication
Technology for Geospatial Data
Collection: with Special Reference to
Disaster Incident
I do here by declare that work described in this thesis was carried out by me under the
supervision of Dr. Shirantha Heenkenda and Mr Prabath Malavigeand report on this thesis
has not been submitted in whole or in part to any University or any other institution for
another Degree/Diploma.
Date ...............
NKBCL Karunarathna
ACKNOWLADGEMENTS
I express my sincere gratitude to both my supervisors for their patience and perennial
SUpJ)Ort and guiding me through my MSc. Thesis. I would like to thank Mr Prabath
Malavige my Technical supervisor, for his visionary approach towards problem definition
of this research and critical review of thesis. Dr. Shirantha Heenkenda, my
internalsupervisor, with his profound knowledge and field experience, helped me frame
constructive ideas and in successful development of the application.
I am thankful to my family for being my pillars of strength. My wife Geetha, for always
keeping my spirits high, encouraging me to bring out the best in me and motivating me to
always aim high and strive for perfectioni. I so blessed to have such a wonderful family.
I]
TABLE OF CONTENT
CHAPTER ONE
INTRODUCTION
1.1. Introduction 1
1.2. Study Area 3
1.3. Problem 5
1.4. Significant of The study 6
1.5. Objectives 10
1.6. Methodology 11
1.7. Thesis Structure 14
CHAPTER TWO
DETERMINING USAGE OF MODERN TECHNOLOGY FOR DISASTER 15
2.1. Disaster Management With modern Technology 15
2.2. Role of intbniiation in disaster management 18
2.3. Disaster Communication 19
2.4. Mobile Technology 21
2.5. Mobile Development 22
2.6. Features, Constrains, Consideration in mobile technology 25
2.7. Android Development 29
2.8. Related works in android 30
2,9. Dealing with disruption communication 33
U
2.110. Mobile Data collection 34
2.11. Basic components of the MDC's 36
iMIai1H-t4*1
TEChNICAL INNOVATION 39
3.1. Existing mobile data collection systems 39
3.2. Mobile implementation in developing countries 40
3.3. Mobile based data collection in developing countries 40
3.4. Existing system for incident reporting 41
3.5. Android Platform 42
3.6. Android Application and Development Environment 42
3.7. Proposed Android tool for geo-spatial data collection 43
CHAPTER FOUR
RESULT AND DISCUSSION 62
4.1 Features 62
4.2 Data Backup 72
4.3 Application Capabilities 72
4.4 Security Measures 73
4.5 Application Testing 74
4.6 GIS for Emergency Management 77
4.7 Discussion 79
CI-IAPTER FIVE
CONCLUSION AND RECOMMENDATION 82
References 86
Appendix
LIYA
List of Figures
1: android capabilities 2
1.2 : Proposed architecture for geospatial data collection developed by author 14
2.1 : Graphical Comparison of disaster occurrence and impacts: 16
2.2 : 2015 fli-si semester natural disaster occurrence and impacts: CRED Research Institute
I!A
List of Tables
vii
ABSTRACT
The scope of information technology is leveraged in every aspect of society. Spatial data
and related information is a major requirement in disaster management. During rescue
operations, availability of i-cal-time information on a portable device would prove useful.
The aim of this research was to develop and test a GIS-hased mobile application on the
Android platform with disaster speciflc software modules. This mobile application is
expected to serve disaster management teams during the rescue operations for better co-
ordination and information exchange.
When consider about the urgent and time sensitive nature of disaster situations it is
compulsory to collect and use spatial information of the relevant disaster during a short
period of time. This would be achieved in a collaborative effort by all the parties involved
in disaster management process. But there are substantial problem with collection, access,
dissemination and usage of required spatial data for disaster management. Such pi-oblems
become more serious during disaster management phase with its dynamic and time
sensitive nature. In other words any problem of delay in data collection, access, usage and
dissemination has negative impacts on the quality of decision making and the quality of
disaster response. In this regard disaster situational reporting system would be much
important to succeed in collecting and sharing such spatial data in relation to disasters.
With the purpose ol succeed the above intention smart phone is the ideal equipment. Today
smart phones are becoming the primary computing and communication platform for
peoples daily tasks. Since these smart phones have the functions of installing applications
and provide users with more diversified mobile value added services. Most of these smart
phones are inbuilt with GPS technology. Since the current mobile communication follows
the development trends of GPS technology, make users can retrieve location data by using
map applications and navigational applications. Hence mobile application would be a
feasible route for disaster communication. On this purpose of field data collecting and real
time updating about disasters can be highly improved by using geographical information
viii
technologies. Since then this new source of information, has been found to be especially
useful in disaster management.
This paper aims to address the role of Mobile GPS as an integrated application
forfacilitating disaster management by improving field data collection and in-
fielddecisionrnaking by using Android technology.
lx
Chapter One
INTRODUCTION
I.I. Introduction
The processing capability on today's smart phones has almost doubled over the past few
years. For example the Apple 3GS iPhone uses a 600 MHz Cpu 256MB of RAM ARM
cllJJ), while the iPhone 4 uses the A4 chip which runs at I GHz. With the introduction of
multi-core phones in late 2010 mobile software can take advantage of increased speed and
performance. Many of 2010's top smart phones had a I GHz processor - devices such as
Apple's iPhone 4, HTC's Desire HD and the Windows Phone 7 handsets that arrived
towards the back end of 2010. After this dual-core phones such as the LG Optimus 2X
came on the market The 2X has aNvidiaTegra 2, 1 GHz processor - a dual-core system-on-
a-chip based on ARM architecture. The Tegra chip still promises 1GHz of processing
power however, dual-core chips enable more power to be squeezed out of the processor
because the chips contain two 1GHz cores - meaning there are two lGl-Iz processors that
can be used in parallel to speed up performance, provided the mobile software has been
optimized to take advantage of the parallel processing power. Dual-core chips should
enable a noticeable speed and performance increase, particularly when it comes to
multitasking. In 2013 the latest smart phones feature multi-core processors with dual and
quad-core processors avail able.
This availability of increased processing power coupled with smart phones that have
numerous inbuilt sensors such as GPS positioning sensors, Wi-Fi, Bluetooth, camera,
pressure, temperature, humidity, light and inertia sensors such as digital compass,
accelerometers and gyros, has created a powerful tool which can be used for surveying and
geographical information data collection. In addition many top end smart phones are
starting to use multi-constellation GNSS chips for example the iPhone 4S, iPhone 5 and
Samsung Galaxy Note use a GPS+GLONASS GNSS chipset. This hardware does not exist
in isolation but benefits from advances in computer science, in particular the emergence of
Web 2.0, as well as the availability of broadband and 3G communication networks. Smart
Phone platforms such as Apple or Android provide an API for developers to write their
own software with additional APIs in Android to utilize Google maps. There are also APIs
available for use with Open source maps such as OpenStreetMap.
Geospatial data collection is one of the important tasks for many spatial information users.
Geospatial data collection may include remote sensing data, field data and other in-house
GIS data conversion processes (i.e. scanning, georeferencing, digitizing, etc). Among
them, field data collection is one of the first steps for spatial information users, especially
for geographers, geologists, biologists, crop scientists, ecologists, etc. Field data collection
is required for several reasons, such as collecting Ground Control Points (GCPs), ground
truth data collection for result validation, collecting soil contaminated sites, plant or animal
species, and gathering public opinions for retail market analysis in order to analyze the
spatial distribution patterns of objects and information on their associated attributes.
2
Accurate field data collection is also necessary for adequate spatial data analysis and
proper decision making. While much of the underlying technology is already available,
there are challenges with respect to the usability of mobile applications. Traditional field
data collection (i.e. pen-and-paper based) is a time consuming and bulky task. For
example, need to prepare base maps, collect secondary dataset, and other paperwork. This
is not practical to use in real-time disaster information collection, which occurs in
unpredictable places and requires a quick emergency response. However, recent
developments in mobile communication, Global Navigation Systems, the Internet and
portable computational devices such as Notebooks or Ultra Mobile Personal Computers
(UMPC) allow us to conduct field data collection in a timely manner. More-over, under the
client-server setting for field data collection, a field user may take advantage of digital
repositories prel)ared for data collection (i.e. base maps, satellite), as well as information
resources more generally available via the Web. For example, use of Web Map Service
(WMS) to access Google Maps or Microsoft Ring Maps data from GIS applications via a
HTTP interfoce. It can provide Google Map or Microsoft Ring Maps image data to any
GIS applications that can use a WMS service for raster data. This can eliminate the time
for baseman preparation and other image processing tasks.
This project investigates the usability of a mobile application for field data collection in a
disaster situation. And also construct a Web-based GIS system to integrate, store, share
and retrieve the collected data in real-time, which could he used for example in metro-
logical data collection (i.e. surface temperature, wind speed/direction) and damage
information in disaster areas at various locations.
The study area of this application covers WebOlS application, Geographic Information
System (GIS), GPS, GSMCartography and Android application. In this research, I present
a set of algorithms and web tools for automating analysis and comparing the results with
experienced intelligence analysis. The system has been implemented by using ESRI
ArcGlS software, World Wide Web (WWW), as well as querying attributes, display data
layers, zooming, and planning.
3
Throughout history, advances in capability have been fueled by innovation. This study
focused on introducing high technology which can be used by the soldier.
High speed mobile broadband is an essential factor in modern society. People have ability
to communicate as well as exploit the capabilities of the latest smart phones. People
require the same technology that powers high speed commercial cellular networks so they
can send photos, video and keel) track of their unit's location. This study was to introduce
latest communication technologies and live tracking systems using GPS and existing
commercial GS M connections.
Special this system was design to collect field information in very efficiency and accurate
manner. Basically this research was concern in the disaster information gathering but it can
be incorporate into any kind of field data collection systems.
The main advantages gained from working with this system are fast clifTusion and efficient
management of geographic information system. it is, in fuct, well known that works are
depending on the ground analysis.
The internet technology adopted! for GIS application has been indispensable in spreading
basic knowledge. The combination of software and data standards realized in this work has
enabled the management of vast amounts of geological, geophysical and territorial data.
1.3. Problem
When consider about the urgent and time sensitive nature of disaster situations it is
compulsory to collect and use spatial in!brmation of the relevant disaster during a short
period ottirnc. This would be achieved in a collaborative effort by all the pal-tics involved
in disaster management process. But there are substantial problem with collection, access,
dissemination and usage of required spatial data for disaster management. Such problems
become more serious during disaster management phase with its dynamic and time
sensitive nature. In other words any problem of delay in data collection, access, usage and
dissemination has negative impacts on the quality of decision making and the quality of
disaster response. In this regard disaster situational reporting system would be much
important to succeed in collecting and sharing such spatial data in relation to disasters
The problem of the study is to examine how far the facilities available in Mobile and
telecommunication technology are utilized for incident reporting and data collection in
disaster situation.
This availability of increased processing power coupled with smart phones that have
numerous inbuilt sensors such GPS positioning sensors, Wi-Fi, Bluetooth, camera,
pressure. temperature, humidity, light and inertia sensors such as digital compass,
accelerometers and gyros, has created a powerlul tool which can be used for geographical
inirmation data collection. In addition many top end smart phones are starting to use
multi-constellation GNSS chips for example the iPhone 4S, iPhone 5 and Samsung Galaxy
Note use a GPSi-GLONASS GNSS chipset. This hardware does not exist in isolation but
benefits from advances in computer science, in particular the emergence of Web 2.0, as
well as the availability of broadband and 3G communication networks. Smart Phone
platlorms such as Android provide an API for developers to write their own software with
additional APIs in Android to utilize Google maps, There are also APis available for use
with Open source maps such as OpenStreetMap.
5
1.4. Significant of the Study
Nowadays, disasters are a serious threatening to human lives and property .Flence,
appropriate management of these disasters has become one of the most notable topics of
human beings in current century. Disaster management process requires precise and
reliable information about the current situation of disaster, existing facilities and sources,
vulnerability, access routes etc. More than 80% of this information has spatial components
of location. There for Gco-spatial Information system(GIS)as a tool to collect, store ,modal
,analyze and display large amount of spatially information layers, support all aspects of
disaster management.
With the purpose of succeed the above intention smart phone is the ideal equipment. Today
smart phones arc becoming the primary computing and communication platform for
peoples daily tasks. Since these smart phones have the functions of installing applications
and provide users with more diversified mobile value added services. Most of these smart
phones are inhuilt with GPS technology(Beaubrun et al. 2007). Since the current mobile
communication follows the development trends of GPS technology, make users can
retrieve location data by using map applications and navigational applications. Hence
mobile application would be a ftasihle route for disaster communication. On this purpose
of field data collecting and real time updating about disasters can be highly improved by
using geographical in!brmation technologies. Since theii this new source of information,
has been found to be especially useful in disaster management.
This paper aims to address the role of Mobile GPS as an integrated application for
thcilitating disaster management by improving field data collection and in-field decision
making by using Android technology.
6
not without challenges or diliiculties(Miehael Trucano 2014). Some common notable
issues and challenges are:
1.4.1.1. Technology
What technology should we use? What are the minimally viable specifications required for
the devices used in mobile data collection efforts? What sofiware applications are
available, and what are their related advantages and disadvantages? These are often the
first questions that many groups contemplating extending or complementing existing data
collection efforts thi-ough the use of mobile phones often ask. While questions such as
these will (or should) inevitably be posed at some point during the planning process,
leading with them is typically a mistake. It is important that choices around a specific
technology or device not deline the initial scope or conception of the extent to which
mobile data collection efforts might be beneficial and possible. No one technology may do
everything that is required. Where one too] may appear to be a perfect fit for what is
required, it may not work at the necessary scale. Vendors or partners may propose use of
certain technologies or devices which may not be well suited for the specific data needs
and/or data collection and sharing processes of the sponsoring group. Deciding which
tools to use, and which partnerships to develop, may be critical pieces of the puzzle. First,
however, it important to have a laiger pictures in place of what the objectives of a
particular data collection might be, as well the ielevant local context (including key
stakeholder groups). Once that has been established, technology-related decisions can be
made in the service of both higher order goals and on-the-ground realities.
1.4.1.2. Training
While in some instances less training and explicit instruction may be required, because the
tool is being used (a mobile phone) is familiar to respondents and enumerators alike, in
sonic circumstances additional technology-related training and support may still be
required. The adoption of user-centered design principles and techniques can help in some
circumstances to avoid the need for certain types of training. (IL for example, an interface
is easy or even 'inluitive to understand, users may not need to spend much time figuring it
7
out.) That said, depending on the nature of the data collection process and the methods of
data transmission, additional training may well be required.
1.4.1.3. Cost
The costs of designing data collection instruments delivered digitally may be considerably
higher when constructing traditional paper-based technology. In addition, new back-end
technology infrastructure may need to be procured and put into place. Where it is not
possible for enumerators to utilize their persona] phones (whether because such use is not
customary or permitted, because existing phones have insufficient functionality or because
mechanisms for covering or reimbursing related data transmission costs are not in place),
devices may need to be purchased and distributed (and potentially collected once they have
served their purpose). Air time may need to be pui-cliased. (More than a few data collection
efforts by mobile phone to bene lit charities' have foundered because sponsoring groups
have wrongly assumed that mobile operators would be quick to donate free airtime for a
good cause'). Whether or not these costs in aggregate are cheaper than the way things are
tra(litionally done or not - and they often are! - sponsoring groups may have difficulty
estimating and budgeting for such costs on the front end, especially the first time they
engage in efforts of this sort.
1.4.1.4. Security
Digital collection and transmission of data as part of large scale survey efforts carries with
it numerous potential risks and challenges related to data security and privacy that are often
fundamentally different than those posed as a result of traditional paper-based survey
efforts. if stored on devices, data can potentially be stolen or improperly accessed - the
same holds true during data transmission. The use of encryption at both the device level
and during transmission can greatly mitigate such risks, but the use of digital data security
tools, protocols, and good practices, as well as related regulatory frameworks, laws and
guidelines governing the use of such tools, may not be known widely known - or in some
places, even be at hand. Where third party ven(lors or tools are utilized during the mobile
data collection process - something that is usually the case - care needs to be taken to
ensure that ownership, possession and utilization of data collected and transmitted are
clearly articulated. Sufficient mechanisms need to be in place to audit i-elated arrangements
and agreements, and to ensure that penalties for non-compliance are clear and enthrceable
Though there are afbrcsaid challenges has to be addressed while developing a disaster data
collection system, there are possibilities to overcome those challenges.
9
1.5. Objectives
The main objective of the study is to build up a system for disaster incident data collection
using mobile and communication technology. The specific objectives are as follows:
Introducing mobile technology and location based service for field data collection
in disaster situation to overcome the existing paper based data collection and reporting
methodology.
To improve the efficient and effective data transfer from field workers to main
station in disaster situation.
4. Develop a mechanism to get the disaster incident data for decision makers.
1.6. Methodology
1.6.1. Analysis
Development of a mobile application for disaster field data collection consists of Android
mobile apps and web interface with fully stored data retrieve functionality. This mobile
application includes the location data such as province, district, Division sectaries division
and latitude and longitude. And also affected data in numbers such as affected location,
affected people and each and every data required for disaster management process.
The mobile application has capable to acquire real time GPS data with situation incident
related photograph and has capable to store each and every data in its local database
.Application has background service to cheek availability of internet facility of the real
location and if connection is success it will automatically transfer the data into database
server without any user involvement.
is developing using PHP and HTML. The relational database is MYSQL. Web server is
apache.
Android phone
GPS reception
Server application
Database server
Software Testing
Location Accuracy
12
Time consumed
GPS
Internet (Map loading and information display)
Battery consumed
Memory consumed
Network Access
3G/2G/Wi-Fi
Field Testing
Dense forest
Urban area
Cloud cover
Humidity
Hilly Terrain
Field Workers
Random Users
1.6.4. Architecture
An overview of the architecture for the Geospatial Data collection system is shown in
Figure 2 The web application runs and is hosted on an Apache web server and the disaster
information and is stored in a MySQL database on that server. When a user logs into the
web application, data are retrieved from the database and displayed to the user. The
disaster management web interface uses a responsive layout to adapt to the screen size of
the device for each user.
13
Satelite -
VV
GSM
--
Network ArcGIS
Ok 1J-J Web
Server
Collection of
Disaster ! API
Information interface
Figure 1.2: Proposed architecture for geospatial data collection developed by author
14
Chapter Two
DETERMINING USAGE OF MODERN TECHNOLOGY FOR DISASTER
The number of disasters, both natural and technological, has been climbing over time. Data
on all categories(other than terrorist attacks) from the International Disaster Database, EM-
DAT, show a steady increase in the frequency of natural disasters during the past 35 years,
with almost as many events occurring during the past five years as in the whole of the
previous decade. According to the EM-DAT database, there were on average 428 disasters
a year between 1994 and 1998, but the annual average jumped to 707between 1999 and
2003.Countries of low human development (as defined by the United Nations) suffered the
biggest increase in the occurrence of disasters. Until the 2004 tsunami, the average death
toll had been declining (from 75,000 a year to 59,000 a year in those two periods
respectively); but the numbers affected by homelessness and displacement increased
markedly, from an average of 213 million year to 303 million a year.
Amcricas
Table 2.1 :20 15 first semester natural disaster occurrence and impacts
15
Oceania
Europe
Ava
Mod
Amelcas -
Air Hd
U 10 20 30 40 50 60 70 80 90 100%
Figure 2.2:2015 qurter natural disaster occurrence and impacts: CRED Research Institute
Health & Society (IRSS)
Over the past decade, there has been an alarming increase in the frequency and also in the
intensity of disasters in various parts of the world. The Haiti earthquake, Katrina hurricane,
Indian Ocean Tsunami and the Nargis cyclone have been major disasters over the last
decade. These disasters force mankind to think of ways to cope up with such calamities.
The increased number of affected people and spatial extents of disaster impact due to
disaster and the high economic losses from natural disasters are a cause of great concern.
The economic growth of the affected country slows down and takes decades to recover
completely.
Especially the developing and under-developed countries take a longer time to recover
from such losses. This calls for enhanced methods and techniques for disaster
management. Every country has to realize this need and think of better ways to manage
disasters. It is true that natural disasters occur at a scale that causes much destruction and
many losses which are unavoidable. Even though scientists and researchers work
constantly on predictions and weather forecasts but sometimes they do fiil to foresee the
impact a certain disaster would have. Sometimes they are caught totally unaware by such
calamities. But management of rescue and relief operations can be planned before-hand
and executed at the time of disaster. The disaster management techniques, even if already
existing, need to be constantly revised and updated. This is because new technologies keep
coming up and should be leveraged for disaster management to produce profitable results.
A project worth a mention in this aspect is Sahana Eden. It was initially conceptualized as
Sahana Software and developed by the IT community of Sri Lanka to help in the relief
efforts after the 2004 Indian Ocean Tsunami. This software package evolved to be known
as Sahana Eden. It was supported by a voluntary community that includes disaster
management practitioners, academicians, students and companies. The communities
promoted customization of the software by making it available as free open-source
software, with related standards. The project was a successful implementation of a disaster
management solution to help manage relief organizations, people involved, assets and
lw
inventory. The project also used maps to make assessments and bring about awareness of
the situation. This set a perfect example and motivation to think of a technology-based
solution to help improve the way disasters are addressed.
Karnatak (2012) presented use of mobile application for flood disaster management in
Assam, India. The mobile application developed under this study used Windows as a
platorm An Aiidroicl application to support flash flood disaster response management in
India for application development. The data from field to control room was transferred
through an XML message containing different types of data including geo-location and
images. The XML-based data transmission from mobile application to server proved to be
an effective mode ol communication. The data received from mobile device was integrated
in Web-GIS application in a real-time environment and other flood specific GIS data were
also accessed from remote servers.
18
Tsai and Yau (201 3) discussed three problem scenarios that require adequate and timely
information during a disaster response and recovery mission: (a) inadequate escape
guidelines for people, (b) incomplete geographical information for relief workers and (c)
insufficient on-site information for disaster managers. This research work signified the
importance of real-time exchange of both on-site and off-site information for disaster
management. It involved three entities in the example scenarios: rescue/relief workers,
victim and disaster manager. On-site information was required by the relief workers to
plan evacuation routes and pertorm rescue operations whereas off-site information was
used by disaster managers fbr better decision-making and management. For example
disaster managers retrieved location information from relief workers and plotted them as
point locations on the guidelines maps. As soon as they received emergency assistance
requirement from victim, they could locate a rescue worker closest to the spot and convey
the information. This highlighted the need for simultaneous execution of the on-site and
off-site operations resulting in updated information at both ends and prompt emergency
response. A mobile application was designed that displayed guidelines for on-site escape
and rescue. Successful results were achieved afier testing the integrated information on a
mobile platform in a simulated scenario. Participants enacted as victims, on-site rescue
workers and off-site disaster managers. Disaster managers updated current information as
received from on-site rescue workers. Victims saved time in performing self-evacuation
with help of emergency guidelines received from off-site disaster managers. The study
was conducted for the Typhoon disaster type, but indicated applicability to other disaster
scenarios.
19
disaster time, information sharing, collaboration and coordination are very important for
the response and recovery stages.
After the September II attacks in 2001, Asian tsunami disaster in 2004, and Sichuan
earthquake in 2008, there has been a burst of online activities from netizens across the
world, not only have more people turned to the net to receive the most updated news, but
20
the Internet has also played a large i-ole in coordinating logistical efforts, raising funds,
expressing views and locating missing people. In Taiwan, the Morakot Typhoon in 2009
showed the online social networking can be influential in disaster communications. During
the disaster, web users began reporting the real-time situation on the forum PTT, one of the
most popular Internet social networks in Taiwan, and a group of internet users from the
Association of Digital Culture Taiwan established an unofficial Morakot Online Disaster
Report Center tor coordinating information. During the disaster, these social networking
sites help a lot to instantly update infrnmation, even earlier than government and mass
media.
Feedbacks, sharing and active search behavior have become influential for disaster
management. New genres of websites seemed to be developed for people to search more
disaster information such as some sites providing information on missing persons. The
Google Crisis Response team uses its strength to offer tools or content to assess the
severity and scope of a disaster. The tools including Google Person Finder which connects
those seeking information about loved ones, and Google Resource Finder, which helps
locate medical facilities and other emergency services. Google also provide high-resolution
satellite imagery to crisis responders and monetary donations to non-profit organizations
that provide relief services. When mobile also had become a device for surfing internet and
the SNS software are built in as an app on Smartphone, it has more functioned as a
convergent service for multi-usages, mobile apps has become tools for deliver an alert or
other notifications.
Apple OS, Blackberry, Symbian and Windows are all available for
development(Trenholm, 2015).
21
Advances in mobile technology and wire- less data communication services have made
these mobile devices increasingly reasonable and more widely available to the public. As
well, remarkable improvements in the ability to transmit data have aIlOWe(1 mobile devices
to compensate for many of their computational constraints (Qian Wang & Ralph Deters,
2010), resulting in mobile phones and tablets has become the primary computing among
the rapidly growing number of users worldwide. Recent estimates have placed the number
of worldwide mobile subscriptions to he nearly 7 billion, which is equivalent to about 96%
of the world population (Itu .2015). However, as many people own and use multiple
mobile devices, the actual number of mobile users is smaller but still significant at 4.6
billion, which is approximately 65% of the world population(Sung, 2011). Mobile
technology is becoming increasingly integrate(l into our society, and many of the unique
features of mobile devices present new opportunities in aiding the disaster management.
Web applications, on the other hand, are websites on theinternet thatmimic the look and
feel of native applications, and are accessible through the web browser on the mobile
devices. They are typically written with web programming languages such as PHP and
22
JavaScript use formatting languages such as 1-ITML5 and CSS and are insta1led' onto
mobile devices by creating a bookmark to the website on the home screcn(Trenholm
2015). The biggest advantage is that the developers can create a single web application and
automatically have it run across many different devices, making it easier and more
manageable in terms of improving existing features, implementing new functionality, and
maintaining the code for the application. As well, data can be stored on-line in a database
such as MySQL and any calculations or other functionalities can be performed server-side,
which reduces the amount of memory, storage, and processing power the application
requires from the device itself. The disadvantages of web applications are that they require
an active internet connection, and they rely on the browser to support the web technologies
used by the application. Many older hiowsers do not fully support the features and
functionality of HTML5 and JavaScript. Nonetheless, advances in mobile technology and
the capabilities of modern web browsers makes vebapplications a more feasib]e option
than previous technology allowed. For example, the I-ITML5 Geolocation API now allows
web applications to re- quest GPS information from the mobile device directly, whereas
previously only native device-based applications had that capability(Monzavi & Darwish
2014). Of course, with enough resources a developer could feasibly create bothweh and
native device versions of their mobile applications if they felt it was necessary and
appropriate to do so. Ultimately, the decision to develop either a web application or a
native device application depends on the needs of the users, the goals of the developers,
and the intended purpose of the application.
But considering all the facts if someone needs to make use of device specific hardware or
needs very fast and accuracy will do better with the native solution (Kushwaha &
Kushwaha 2011).
SEEL Cost -
flNATNEA
..:
MENNEN
'. Mostoni incestntnnt
Portability
Maintenance
U lonpion to .neintair and dow to 10P oat hngto Refalivoty ,no,pIo to nioiniain wdh natant opdatnn
Slob itui, c,alJi dow to ii:,,,, 011.1K' Cl JpiriiIiod Ira,,. dcstcp radiAtor
Speed of Delivery .,t l, it tnntoiq till,1000 ,t000lri, tooqolton ii IN of ttot,nC
Perormance R tiar llyw,thqotrk load g ndted to Plo - iotornt rolenca towolts in tlower toad and 'e,ponn.
lnte9rated Device
ln,eqaware a o, aW VaryIottrtddecicnd1to40en
Features
Pt-rNctf too
R
0
Future Proof 1.0 Ct ,r,posniblo to adopt dootC,trnojiion
U
In 2013, two significant pieces of mobile industry research highlighted a strong preference
for native apps among users. Equation Research surveyed 3500 Smartphone users around
the world about their mobile experiences. An astonishing 85 per cent of respondents
preferred native apps because of speed, high-quality interfaces, and platform features, that
even the best of HTMLS developments cannot provide (Anon 2013).
Meanwhile, the widely-reported Bite Interactive survey4 revealed that 66 percent of
iPhone users and 63 per cent of Android owner's prioritized native apps over
HTML5.They were well aware of the value of making full use of Smartphone capabilities.
Only 19 per cent of overall respondents were indifferent to the distinction between native
and HTML5 (Anon 2013).
Now is an exciting time for mobile developers. Mobile phones have never been more
popular, and powerful smart phones are now a regular choice for consumers. Stylish and
24
versatile phones packing hard-ware features like GPS, accelerometers, and touch screens
are an enticing platform upon which to create innovative mobile applications(Meier 2010).
And also according to above author's suggestions, Android hardware will be designed to
tempt consumers, but the real win is for developers. With existing mobile development
built on proprietary operating systems that restrict third-party applications, Android offers
an open and equal alternative. Without artificial harriers, Android developers are free to
write applications that take full advantage of increasingly powerful mobile hardware. As a
result, developer interest in Android devices has made their 2008 release a hugely
anticipated mobile technology event.
Built on an open soLirce framework, and featuring powerful SDK libraries and an open
philosophy, Android has opened mobile phone development to thousands of developers
who havent had access to tools for building mobile applications. Experienced mobile
developers can now expand into the Android platform, leveraging the unique features to
enhance existing products or create innovative new ones(Meier 2010).
According to above discussion and findings it is very vital to discuss the feature in the
Srnartphon e.
Vi(leO to be recorded easily, and touch screen technology allows for new ways for users to
interact with the interfaces of the devices. Finally, mobile devices with data services allow
25
for near instantaneous access to and sharing of information at the touch of our fingers.
Along with the unique features that mobile devices offer, there are several unique
constraints and challenges that must be considered for the development of any mobile
application. The authors of(Qian Wang & Ralph Deters 2010) and (Luca Chittaro 2006)
explore some of these challenges, which include data and network issues, physical device
limitations, and user expectations. The issue of network load and wireless spectrum
allocation for data services is discussed in (Qian Wang & Ralph Deters 2010). The authors
explain that with the increase in the number of mobile devices being used, there has been
an increase in data traffic and consumption of wireless bandwidth. Since there is only a
finite amount of the wireless spectrum that is usable, telecommunication companies and
providers are being stretched to their limits and must focus on improving their data
services to meet the increasing demand. There are several physical constraints that affect
mobile devices, as covered in (Qian Wang & Ralph Deters 2010) and (Luca Chittaro
2006). Almost all of the physical constraints are a result of the size limitations of the
devices. To be small, thin, and lightweight for portability, mobile devices must use smaller
batteries and less powerful hardware in comparison to larger devices such as desktop or
laptop computers. This means there is less memory and computational resources available
on the devices, which affects their ability to run more complicated applications or tasks.
Other physical constraints itielude smaller screen sizes; limited screen resolution, limited
processing power, and variations in inter face input methods such as small keypads or
touch screens. The final and perhaps the most notable challenges are those based on the
user expectations of mobile devices and applications, as discussed by (Qian Wang&Ralph
Deters 2010) and (Luca Chittaro 2006). Users expect that applications on mobile devices
will respond to their actions and requests accurately and in a timely manner, such as when
taking a photo, using the GPS to navigate, or changing the orientation of the device. They
also expect a certain level of interactivity with mobile devices, such as the ability to zoom
or scroll when viewing content. Finally, usei's expect applications to be user friendly.
In addition to these challenges and constraints, there are some otheraspects that must be
considered for mobile applications. ln(Volker Paelke, Christian Reimann, &Waldemar
Rosen- bach 2003), the authors address some significant factors that should be considered
26
when developing mobile applications. The flrst is that the way users input information and
interact with applications on mobile devices differs significantly from desktops or laptops.
There is no standard input method such as thekeyboai-d, mouse, or track l)ad. Input
mechanisms on mobile devices can include real and virtual keypads, touch screens, and
even voice commands, and even these methods can vary greatly between the different
models of mobile devices. Several other considerations when developing mobile
applications involve the context of use, specifically the auditory environment, the visual
environment, and the level of attention. Desktop and laptop computers are often used in
controlled environments, whereas many mobile devices are used in settings where the user
has limited control of their surroundings. Sound use may be limited if the mobile devices
are used in public or outdoor settings, where outside and background noises can prevent
the user from hearing the intended sound. For the visual environment, mobile devices may
be used in a variety of lighting conditions, ranging from total darkness to bright sunlight.
Finally, the level of attention that users can devote to the applications on their mobile
devices may be limited due to interruptions from the environment or other activities
competing for the user's attentioft
27
follows: "Information services accessible with mobile devices through the mobile network
and utilizing the ability to make use of the location of the mobile device Open Geospatial
Consortium" defined LBS service similarly:"A wit-eless-IP service that uses geographic
information to serve a mobile user, any application service that exploits the position of a
mobile terminal."
A Location Based Service (LBS) is an information and entertainment service, accessible
with mobile devices through the mobile network and utilizing the ability to make use of
geographical position of the mobile device. A LBS services can he used in a variety of
contexts, such as disaster(Fajardo & Oppus 2009), health, work, personal life(Braun et al.
2013), etc. LBS include services to identify the location of a person or object, such as
discovering the nearest banking cash machine or the where about of a friend or employee.
LBS services include parcel tracking and vehicle tracking services. LBS have two major
actions, that is:
Obtaining the location of user
2 Utilizing this infmiation to provide a service.
These 2 actions are used to answei' these 4 questions (below) for a mobile user in a new,
fast, and more accurate way, to fiini the basis for LBS:
Where am I...?
2 Where is the nearest ...?.
3 Where is my ..?,
4 Flow does I get there?
LBS services can he categoi-ized as triggered LBS services (push services) and user-
requested LBS services (pull services). In a triggered (push) LBS service, the location of
user's mobile device is ietrievcd when a condition set in advance is fulfilled. For example,
a call to emergency center can automatically trigger a location reqLlest (D'Roza&Bi!chev.
2003).
And also above author explain in a triggered (push) LBS service, the location of user's
mobile device is retrieved when a condition set in advance is fulfilled. For example, a call
to emergency center can automatically trigger a location request. Advertisement messages
can be delivered to users who enter a specific area in a shopping mall, and warning
28
messages can be delivered to users who are in the area where weather conditions will
change (e.g. hurricane, rain). In a user-requested (pull) LBS service, the user decides
whether and when to retrieve the location of his/her mobile device and use it in the service.
User-requested LBS service can involve personal location (i.e. finding the current location
of the user) or services location (i.e. finding the location of the nearest restaurant or bank).
Navigation and direction system is an example of pull LBS services (D'Roza&Bilchev,
2003).
evacuation l)laflS and tracking of emergency response vehicles (Tsou& Sun, 2006). Quick
reporting of incidents and information is a critical task and can be accomplished through
Smartphone applications. A disaster management application is helpful if it captures
29
important data like location of injured and non-injured people, images of the damaged
area, weather up(Iates for the particular location, alaniis and alerts, quick access to maps
and location-based services (Richter &Hamrnitzsch, 2013)
Victim (59/s)
Witness (7%)
General Public (6%) This is for those not affected by the disaster
The study and review of these applications resulted in the conclusion that more than half of
these applications were designed for victims. There were fewer applications addressing
rescue workers to support in rescue operations. Also the major features of the applications
were studied. These included:
The location service was calculated to be used by 81.2% of the applications. 106 apps use
GPSsensors whereas 81 apps rely on the network communication. Most of them combine
both technologies. This is an important consideration since GPS does not work without sky
visibility. Through this research work an application was proposed for better organization
30
of relief activities (Gorncz, 2013). The study also considered the possibility of using
internal sensors within device for example shaking the device to raise an alarm and
changes in user position. The framework was designed to work in different modes (victim
mode, volunteer mode, witness mode and citizen mode) to target different needs. This
study revealed the scope of experimenting with application development in the context of
disaster management by targeting them for specific end users.
Palmer (2012) proposed a framework to help overcome the challenges in the domain of
disaster management. RAVEN - a framework to construct an application was provided
with the utility to collect data using smart phones. The framework was built with the idea
to allow developers to construct a user interface and define a schema at runtime. The
aspect of technological advancements in the field of disaster management was also given
importance. Technology can help manage the operations and can also act as a networking
channel. The framework allowed defining a schema for a structured data store at runtirne
and genel-ating a user interface to edit instances of that schema on the mobile devices.
Developers could quickly create data-oriented applications on the phone itself in a short
span of time. A "People Finder' application using this framework was also implemented.
To he able to compare and contrast the development cffirt required and the usability of the
application, theapplication was developedboth by using a standard Android
implementation and by using a framework implementation.
Standard Android development tools and practices were used by application developers to
develop the People Finder application. This implementation consumed around 3500 lines
of code. This implied that this kind of implementation would require experienced
application developers to complete the task and take time for completion. This contradicted
the fact that rapid application deployment is required when disaster strikes. l-lence the
author considered another implementation as well.
31
Raven Implementation
This implementation was entirely done using the mobile device. It used Schema Creator
application to construct a schema which is not visible to the user but used internally to
create the database. This enabled an edit-user list with a simple user interface similar to the
one developed using Android to he created on the fly (Palmer, 201 2). The paper then made
a comparison between the two approaches and concluded that time consumed to develop
the application using the Raven framework was lesser than the one using the standard
Android tools. Also the framework implementation required just a srnartphone. Thus this
framework offered rapid application development in case of disaster.
n
32
more number of people in need. But the routes did not address the safety and concerns
particularly of the rescue workei
Eleiche, M.A. and B. Markus (2011) discussed the importance of mobile devices in
acquisition and processing of geospatial data and designing mobility applications. To
enable users to pertoiii gcospatial functions in an offlinc mode, a conceptual stand-alone
framework was proposed. This framework was devised to provide spatial functionality in a
mobile device, independent of the communication network. The proposed solution was to
store the objects of interest (images or data) in the mobile device memory instead of the
server. These objects of interest once accessible from the mobile device could he used lbr
processing and analysis.
As soon as the relief and rescue work is initiated in disaster-struck regions, it also becomes
inevitable for the communication network to recover since it has a prime importance in
such situations. Smartphones have the privilege of being able to connect to different
networks such as cellular network (3G. GPRS, EDGE) or Wi-Fi. These devices provide
high utility in different kinds of emergency situations. A study by Farnham et al. (2006)
revealed that cell phones network did recover quickly after the Hurricane Katrina disaster
(Farnham, S., E. Pedersen, & R. Kirkpatrick,2006). Thus it would be a wise decision to
33
implement an application in such a way that it shows usability in absence of network
communication and quickly notify of available networks to perform tasks that need
network access.
34
surveys/assessment or the target population being studied can be surveyed directly via
their personal mobile devices. In either case, the specific questions and structured
Mobile technology can be used to improve the efficiency of data collection processes
(Hameed, 2003). The use of mobile phones in data collection provides the benefit of quick
data processing since the data is in digital form at the point of collection. Users of mobile
phones have also become familiar with mobile-based applications and do not require
advanced IT skills torun them.
35
support (support for images, video, and sound). Flash Lite has relatively poor graphics
performance, partly attributable to the complex processing required for vector graphics.
Google launched Android (Google, 2013) in the year 2007 with the intention of advancing
open standards for mobile devices. Android is an Apache free-software platftwm with an
open source license and is based on Linux.
l Many mobile devices are used for data collection. Each MDCS supports a subset of
mobile device technologies. The most simple hardware 1-equirement is plain SMS. More
complex forms are built on Java or a srnartphone platform such as Android Mobile. Some
MDCS can support multiple mobile platforms for the same form and server.
The administrator interftice is used by a few survey designers and data analysts. It is
used to design the form layout and create the mobile application. It sometimes allows for
data entry and viewing of the collected data. The admin interface acts as the analysis
platform and generally provides basic descriptive statistic ftinctions as well as line graphs
and bar charts.
The third component is one server which hosts the database. It includes some
mechanism to upload data from the mobile devices. Connectivity can be via internet, SMS,
or directly copying files. Once collected, the server presents the data via the administrator
client interfaces, and sometimes the mobile devices in the case of hi-directional
synchronization systems. Some systems integrate the administrator interface and the server
soflware. This is usually done when the synchronization is not done via the internet and the
data is directly uploaded from the devices.
The purpose of this review was studding the trends and possibilities of modern
telecommunication technology and the capabilities of mobile technology, their
functionality and features effectively incorporate to disaster incident occur.
36
In this review most of the authors have studied the importance of gathering
informationahout disaster situations. Richter &Hammitzsch, (2013) discuss the "location
"is very valuable inlormation for the disaster incident among other information. And also
author has emphasized the location as very essential factor when reporting any kind of
information. Then the problem arises. How to acquire a location base data in emergency
situation using technology.
Windows are all available for development. According to study of Qian Wang & Ralph
Detcrs(2010)describe the advances in mobile technology and wire- less data
communication set-vices have made these mobile devices increasingly reasonable and more
widely available to the public. The dilemma is which mobile technology is the best one go
well with the development.
According to study of Meire (2010) among other mobile platforms. Android will be
designed to tempt consumer but the best for the development. Android has offers open and
equal alternatives for developers among other mobile technology So in this project also
target to build an application in android platform.
When study the systematic framework to acquire location base data using mobile
technology Richer S and M Hamitssch (2013) has described about a systematic way to
apply geographical information service through the mobile technology, that can be helped
emergency response teams to identify areas under threat or impact of - disaster. This system
can be implementing to obtain location data in the incident occurs. And also Assif (2012)
in his study the author has present a framework through the mobile smartphonc for disaster
management to cope with mitigation activities after a disaster. This application was able to
37
transfer data to central database through a web application. This data resided on a central
database and used for further analysis. The researcher also considered to implement the
combination of these frameworks into disaster incident occurrences. But in these studies
they didn't mention proper mechanism to transfer data to central data base without any
data connection. If the mobile has not available data connection user has to wait until
connection is properly established. This will course to lose the information. In such
situation every effort is useless. So improving this capability is very much essential for the
complete mechanism. So researcher has going to implement separate communication
module to transfer quick access data into the control room without data misplaced.
Whenwe examine above mentioned infoniation about the disaster management field it is
clear that locational data has the highest value and quicker and updated data collection
method is essential. Since then building up a disaster incident report application is a timely
need requirement in present disaster management mechanism in Sri Lanka.
38
Chapter Three
TECHNICAL INNOVATION
3.1.3. iFormBuilder
iFormBuilder (iFormBuilder, 2014) is a data collection tool that runs on iPad and iPhone
devices. It includes skip logic to dynamically present the right questions depending on
previously provided responses. iForrnBuilder (iFormBuilder, 2014) allows for offline data
collection. It has the following features: enables Local [)atabase encryption in compliance
with PCI DSS, HIPPA, I JITECH, FISMA, 1S0900 I for data encryption requirements;
application level remote wipe and intrusion prevention; custom control of the key that is
used for field-level encryption; iForm ES encryption library compiled from the ground up
and separate from Apple's encryption library; iForm ES application library that has been
reviewed by the United States Department of Commerce; end to end encryption from
device, to sei-vei-, keyboard cache protection; Jailbreak safe. Compared to the other existing
tools studied iFurmBuildcr appears to draw strength from it elaborate security features
(Garher, 2012).
39
3.2. Mobile Implementation in Developing Countries
According to Worldbank Global IT Report (2012), in 2001 there were 20 million mobile
subscriptions in Africa and this grew to 500 million by the year 2012. Africa is now a
boiling pot oihyperconnectivity. Internet is easily accessible to more and more people and
communication between people has been made easier. Hyperconnectivity is redefining
relationships between individuals, consumers and enterprises, and citizens and state.
There are over 6 billion mobile subscriptions worldwide (Worldbank ICT4D, 2012). This
i-neans that three qual-ters oF the world's population have access to a mobile phone. In some
developing countries more people have access to a mobile phone than to a bank account,
electricity or even clean water.
According to Worldbank ICT4D (201 2) mobile adoption in the developing world surpasses
that in the developed world. Most of the developed world has a working legacy
telecommunication infrastructure while the developing world is starting mostly on a clean
slate, increasingly adopting mobile communications right from the onset. Important
innovations that make use of mobile technologies have been made in the developing world.
An example of this is mobile payments.
Traditionally, field based data collection in developing countries is done using paper-based
methods (Genesan & Jhunjhunwala, 2012). Personal Digital Assistants (PDAs) have been
used from the 1990s
mainly in the medical fields. PDAs are however affected by
challenges such as cost, power outage, and lack of robustness in handling databases.
40
In the developing world, mobile phones are increasingly being used in data collection in
areas such as reporting health statistics and advice, agricultural advisory, electronic
monitoring, customer service and natural disaster management (Genesan&Jhunjhunwala,
2012). Mobile phones are transfoniling delivery of primary and secondary healthcare in
developing countries (Woridhank 1CT4D, 2012). The use of mobile phones in data
collection has bencfltcd from the fact that phones are getting more powerful and cheaper.
EM
3.5. Android Platform
Android applications are primarily written using the Java programming language. The
application is then compiled into Dalvik executable (DEX) format which is a custoni byte
code. Each application executes in its own process, with its own instance of the Dalvik
virtual machine. At compile time class files and jar file are converted into DEX format, a
more efficient and compact format (Galavas&Economou, 2013).
To simplify component reuse the fi-amewoi-k allows each application to publish its
capabilities for use by other interest applications (within the limits of the security
constraints enforced by the framework). A developer can make use of the framework, APIs
and the Google developed libraries when developing
Android applications are composed of one or more of the four basic application
components. The main building blocks of an android application are listedi and discusse(l as
follows
Activity
It is a core component of the android applications; Activities represent a given task that
can be clone by the application. It can also be represented as a single screen User interface
that interacts to do functions like dialing, taking photo and so on. A single android
application is composed of multiple activities. For example an android ECG app can have
an activity that shows the heart rate samples and other activity for settings or splash screen.
Services
Designed to keep running in the background, services are responsible for tasks like updates
and remote processes. Services can be implemented for time taking operations and
processes that need to be scheduled and carried out regularly. Services do not provide Uls.
Content Providers
These are used as interface to data .A content provider helps to maintain shared data
between applications. Data can be shared and modified according to permissions using the
content providers. Data encapsulation and data security is provided using content
providers. Consisteiit and secured data access is managed and maintained using content
providers and provider clients
Broadcast Receivers
These are broadcast announcements made by the system. Examples include a broadcast for
announcing that battery is low or to inform an update is ready to be downloaded. Broadcast
Receivers can be used to initiate services to do something.
One of the merits of' developing for android is the cheap and easiness of the development
environment. The Android SDK and tools are provided free of charge from the
developer's site (http://developer.aiidroid.com). In addition to this, well organized
documentations make it easy for developers to startup and (live in to the platform quickly.
While developing an(lroi(l applications, Tools from the SDK can be invoked through
command Line or the ADT. In this project, the Eclipse IDE is used for the application
development The ADT (Android Development Tools) is Eclipse plugin that is
recommended for developing android applications since it offers direct invoking of tools
during application development. (Android developers, date of retrieval 6.2.2012.)
3.7.1. Analysis
43
Chapter 2) to understand manual and digital data collection methods, to establish the
existing mobile-based data collection system and their current relevance. Gaps in existing
data collection tools were also identified. Key features in existing data collection tools will
he identified for inclusion in the piototype that will be developed.
3.7.1.1. Scope
The proposed system has mechanisms for data collection, transmission, storage, data
protection and retrieval.
3.7.1.1.2. Transmission
Submitting of responses via the mobile-based front-end to the central database is initiated
by the respondent by clicking a button. The data is transmitted using the https protocol. On
the mobile device completed responses are transmitted to the central server by a
background process that periodically checks for completed answers in the mobile device
database. Data is stored on the mobile device storage until and good telecommunications
link is available upon which the background process submits the data over https.
3.7.1.1.3. Storage
Responses submitted via the mobile-based and web-based front-ends are stored in a
relational database in adequately normalized database tables. The data is stored securely
and in a way that it lends itself to easy retrieval and analysis. And also until make a good
telecommunication establishment all data collected from mobile app has stored their data
on local database itself.
44
3.7.1.1.4. Data Retrieval
The proposed system allows retrieval of a excel format file that is appropriate for
importing into advanced data analysis tools in web-based side. These data can be converted
into any are gis related format easily for the analysis.
3.7.1.1.5. Security
The proposed system provides for encryption of collected data on the phone, in
transmission and in the database. This is to protect any sensitive data that the tool may be
used to collect.
Requirement Description
I Data Collection The system should support any type of data
to collect
2 Manage the system System should provide a way to manage
system lifecycle: not started, running
,intcrmediatc ,closc
3 GPS acquiring System should provide better location based
service
4 Mobile data connection System should have data connection facility
availability checker.
5 Data storing capability The system should provide a way to
caching respOnSe until proper data
connection.
6 Data Transmission The system should have proper data
45
capability - transmission mechanism to send data to
Requirement Description
Performance The system should respond in less than 3
second when submit data
2 Security The system should required authentication
to identify the user
3 Availability The system should have 99% availability
24 hour a day 7 day week
46
4 Restoring System should have restore facility to
avoid the reentering same data if any
system failure.
<incIudo'
47
Stakeholder: User
Precondition: GPS should enable
Post condition Data entering form enable to enter data
Flow of Event (Steps): Actor System
I. User input details to I I System save data on
interface and click send local database
to sever 1.2 System check the data
connection availability
Table 3.4: Add new incident in use case description
49
Precondition: Data connectivity checker should enable with the best connection
Post condition Data stored in local database and send to central database
Flow of Event (Steps): Actor System
User send the data to 1 .1 System saved data on
server local database
1.2 Check data connection
availability, if
connection is stable
1.3 Data send to central
database.
50
2. Web application user 2.1 System provide different
export data interface to export saved
data
Table 3.8: Display datainuse case description
In this system mainly forecast on the Location based service of the mobile technology for
collect geographical important data in the field at any time. Determining the geographical
location is one of the key factors of the location based service. Geographical location can
be usually determined with coordinates latitude and longitude.
51
Figure 3.2: Proposed system Data flow diagram
52
Figure 3.3 depicts the main components of the mobile application. The main components
in the mobile application are questionnaire display, map processor, response submission,
phone access and security.
Authentication
Location Acquisition
Incident submission
Phone Data
Access
3.7.5.1. Authentication
This module handles security of data access in the database. It makes use of user roles to
determine who can have access to what for system administration purposes. It also makes
use of security access of users.
53
important part for the GEO spatial system. Location base service (LBS) is the main
architecture for the location acquisition from the mobile.
Application Layer
GIS
Middleware Layer
Postioning Layer
54
database through the web application. After successfully transferring of data to central
database web application send the acknowledgement to mobile app. After get the
acknowledgment respective record transferred to server will update as send data in mobile
database.
55
majorly once the relief operations begin. For the team officer, it is crucial to report
incidents and details that are important for analysts. These details include the incident site,
exact location coordinates, images, video recordings, number of people rescued, injured
and died. The analyst can make assessment of the disaster impact both regarding life and
property. The research work enables reporting of this information through an interface
which allows user to fill in data. It is a good practice to have template report forms ready to
be used at the time of disaster.
Android application with server and data base integration for field data collection. It allows
user to fill the data that needs to be reported. These two tools have been used in the study.
Creating Server
Windows Apache MySQL and PI-IP (WAMP) version 2.0 was downloaded and installed
by following instructions from internet and set the port number for local host as shown in
Figure 3.3
Co..flgw.Uoo
__v._ .
IddIt.fl; *bO (' Sf0.
50.0.
5o So.. Sk
500. S.o S
5..th.10M40 Sc Sth*. S'"fl
50.0 Sf0 5000..
0010.4 Y.1$Ofl 50010
Tools
a
0
Vow Projeto
56
Form Element Description Data Type
Province Dropdown selection Text
District Dropdown Selection Text
Load according to selected
Province
DSD Dropdown Selection Text
Load according to selected
Location Data
District
Disaster Drop Down Selection. Text
Include every possible
disaster type
Location Latitude and Longitude of Number
the exact location
Family No of Affected thrnily Number
People No of affected people Number
Affected Details Death No of death Number
Injured No of Injuring Number
Missing No of missing persons Number
Fully damage No of Building Number
I)a ni age
Partially Damage No of Building Number
No of saf Location Number
Safe Location Family Number
People Number
Image Image Of the disaster Byte String
Date and Time Date and time of the Date/Time
incident
The person who supposes to provide incident must register in the web system with their
IMEI number of the mobile to prevent the unauthorized incident reporting. Any person can
58
send the incident by installing mobile app on their mobile but authorized mobile can only
be submit the incident. This mechanism prevent the unauthorized messages come from the
mobile application. Every person must responsible for their details come from their mobile
applications.
59
amount of work. For instance, it might initiate a service to perform some work based on
the event.
In this study mobile application used Broadcast receiver for update the network status. It
will pop up a toast when the mobile data connect or disconnect. This service is run as
background service of the mobile phone.
&Cvenide
Saire a Rin rre:hcd on Thead
protected String dolnBackground(Void... params) {
u:c -geneated rnehcd nub
String result = null;
try {
HttpPost httpPost = new I-tttpPost(
"http://slrider.com/sitrep.php');
httpPost. setEntity(new UrlEncodedForinEntity(data));
Report Generation
Data extraction from WEB app
61
Chapter Four
4.1 Features
This application processes a number of features and functions to aid in the management
and maintain of the disaster situation. The application was developed using Android,
ArcGIS desktop and ArcGIS Server. Location data collection, tracking, geospatial analysis
and data sharing for disaster management were the main concerns of the application. It is
obvious that the geospatial locations of the rescue teams are vital in mission planning and
management of the rescue teams. Three android applications developed for tracking of
rescue teams, report incidents with geo-tagged images and distribution of aids to affected
people. Those applications directly sending latitude and longitudes to the ArcGIS server
which use as inputs to the early warning system developed using ArcGIS modelbuilder.
Separate android application is developed to address epidemic diseases.
62
4.1.1 Login
Application is designed to validate all the inputs. Ensure the security of data by creating
different database users for each application with very limited rights to database objects.
All the data encrypts before inserting it into the database, and decrypts it when retrieving.
When a disaster occurred data must be made available to users when they need it. It is very
important in rescue and relief operation. The system always tries to maintain the
availability of data using minoring MySQL database, More over data will provide need to
know basis.
While maintain the high availability of data it is important to maintain the integrity of data.
Accordingly system will prevent unauthorized access to data. Access to data can be
restricted by using passwords and controlling access rights by login permissions. This
system includes strong password encryption methods. System uses a random salt lbr each
password. More over system limit the number of failed login attempts.
System users will be registered into the system using their IMEI numbers. Therefore even
users have the application, they cannot access to the system in order to assure integrity of
data. If the mobile phone is lost administrators can disable the IMET of the l)alicular
phone. It will prevent unauthorized access to the system.Ifmobilc reach to locations where
no GSM coverage, the Android Application will store the data by itself into internal
database and upload to the server when it received GSM coverage for first time. This will
ensure the availability of the data.
Figure 4.1 shows the Home Page of the Global Disaster Risk Analysis Application. Home
page allows user to select required page by selecting left drop down and tile graphical
interface.
63
IE 1 * ___
Risk Analysis, Pvn06n
Mitiaation Aoolication
9 IJrrs Onliri.
-1
406
Sri lanka
(l
!:
(A
., Ptportd Innidnt
User Requirement - When troops in the rescue mission operation commanders and the
other relevant officers need to monitor exact troops locations which allows decision
makers to guide the troops in to exact locations and they can get a clear image of the rescue
mission, and we have to ensure the safety of the rescue team by monitoring their positions
all the time. Currently there is no any responsible organization providing such a facility to
the rescue teams.
Solution - We have developed tracking android application which can be easily installed to
any android smart phone and this application will be sent to the latitude and the longitude
of the current position to the web server in each 5 seconds.
64
AIL
65
Administrators can easily add tracking devices to web by adding EMI numbers of the
phone. A live tracking system for the rescue teams and rescue vehicles are used Android
devices and in-house tracking devices. This application can be viewed all the tracking
devices currently by operating or devices belongs to different operational levels.
Problem - When an incident occulTed the rescue teams will be sent to the disaster areas,
these teams are controlled by centralized location and get the information through voice or
a paper based communication.
User requirements - Field Commanders, resource managers face difficulty due to lack of
information to update their maps. Manual updating let human errors and time consuming,
but still current practice is to send message through traditional message pads or described
about the illCi(lefltS through radio sets or telephones.
66
location on map along with the tagged image shows a satellite view with the point location.
Once
Clicked on this point, it displays the geo-tagged information recorded for this location as in
Figure 4.6.
The Reporting feature allows user to upload images, location co-ordinate, video, textual
and numeric information, date and time of reporting. Figure 4.5 shows the report elements
as per First Incident Report.
67
3GbGS851Pei ?3GlIG &50 Pu
110
LOCATN UTMS
prmv
Daste
4327
AFECTED OflMt5
SUE LOCATION
NgLoc*ton FamHles
Da;e
ii.ina Ii.
-----1
iMii eii
AIIKId
D.th
Pinh
owars
Challenge- Not sufficient aids for the people who affected by the disaster.
User requirements- Disaster management agencies require sufficient aids to distribute
among the people to stay in disaster camps due to effect of the disaster. But currently there
is no proper mechanism to distribute those aids immediately according to the actual
demands of the each camp.
Solution - Our initial response, the efforts focused on the basics human requirements such
as food, shelter, water, and sanitation. Health clinics were set up to help care for the injured
people. With the past experience, we have identified that distributing aids for the
peoplewho are very difficult and not accurate. Hence, we have developed an Android
application which can be sent.Theexact amount of the suppliers is needed and the number
of people living in the particular shelters with their gender and the age same as Situational
Report application. This will automatically pick the location and send the data to the
assigned sever using GSM within 10-15 seconds from anywhere in the country.
69
Figure 4.5: Demand App
User requirement - Public Health Inspectors (P1-Il) and other responsible government
agencies required a fast and accurate method to monitor and track the patients who are
suffer from the epidemic diseases like dengue. AIDS, etc... currently they do not have
such a system to help their day to day life.
Solution - This attempt has been made to introduce a GIS and Mobile Communication
based Geo-tagged epidemic data collecting by installing a specially developed Mobile
application into the Android Mobile Phones of the front line field health officers (PHIs),
enabling them to enter basic data on the patients from the field on a real time basis.
Accordingly, the data and information of the cases are geo-tagged to the user's location and
shown on Google Maps, ArcGIS Server or ArcGIS Desktop.
70
Mobile GIS System for Dengue Data Collection
r-7,_.,~ N
;
71
Coeiori of Ceng it
Pat ients Location and
Web Server
Basic Information by PHI
rcGIS - GoogleBartli
- I.
:
This system will vastly reduce the time lag between collecting and reporting data and
preventive action taken by the authorities. The application is quick and easy to use for
health workers who are constantly on the move and performing multiple duties; it is simply
a click of a button, rather than pages of paper work.
71
4.1.4 Mitigation Map
Demand Report - Users can view the reports of demand send through the Demand Android
application.
Before back up data classified into different categories considering usefulness and value of
data. Network Administrator makes sure that whoever is backing up data and whoever has
access to hacked-up data. This eliminates need to store duplicate copies of unchanged data.
All the backups are to he written into DVD and keep in a secure place (offsite area) to
protect against a disaster. Frequently restore backing up to a different server to verify
backup data. This server also used as a mirror to the original server. When a disaster occurs
the mirror server can he utilized.
72
ix. System operated in user friendly environment.
X. System can install to any android device.
Software can download and install very easily to the device.
Easy access in any place.
Software can he modifying according to the requirements.
Data can he export into Are Gis capable formats.
Android applications are written in the Java programming language. The Android SDK
tools compile the code along with any data and resource files into an Android package.
Once installed on a device, each Android application lives in its own security sandbox.
Android starts the I)OCCSS when any of the application's components need to be executed,
then shuts down the process when it's no longer needed or when the system must recover
memory for other applications.
In this way, the Android system implements the principle of least privilege. That is, each
application, by default, has access only to the components that it requires to do its work
and no more. This creates a very secure environment in which an application cannot access
parts of the system for which it is not given permission.Whcn it comes to secure software,
there are Some tenets to accomplish. These basic tenets are:
74
TcTki
Teid Lo.w1ak
ZG Uplu3TI NOMA
IN Use
tJpM
.-H Up to
Upmn 22 i* - j7f
No SkMA3 Upb
LV"Umptifift
Nil 10 fiecoodi.
FUL.tI
L)c F4Isvi Lti, Aic*uii.y and SMUCSIMCS -3O kciinl
an lSIlt at
NIdd tc
Urbam Sm -2'k -
Ht11idk Upii&
Wi h.on a 10 S .n,m.h Nd
: : 11
S.4tAIr !, nd. Na
75
The testing results as displayed in above are discussed here. After perfirming the network
testing, it was found that GPS exhibited same accuracy in presence and absence of
Network but the time consumed to display GPS results varied. Using Wi-Fl. reduced GPS
loading time since it itself gave an accuracy of up to 22 meters. Maps loading and
information display was best with Wi-Fi and 3G network. The 2G network comparatively
took more time to display maps and satellite imagery. As proven theoretically, cloud cover
and humidity had no influence on GPS signals but dense forest greatly affected it. It was
almost at the verge of getting no signal for a long time. Hilly terrain and urban area
affected GPS signals in some areas as experienced while walking or travelling besides a
trail of high mountains, standing near the entrance of a building and between clusters of
bui I di iigs.
Network connectivity was affected in hilly areas and alternative available network had to
be manually chosen. In absence of network, GPS gave the same accuracy but it took longer
time tp display results as co]1]pared to the time taken in the presence of network. Maps
could he loaded and displayed in absence of network as well. This was because the maps
were used earlier and thereby stored in cache memory. They showed uponly for the
location they were earlier used.
The app consumed minimal memory and battery. While the App was running, the battery
consumed was about 2% of the total hours remaining for use. The total memory used by
the app was around 14 MB. Internal storage memory consumed by Disaster Sitrepwas 9.84
MB and external storage of 4 MB.
For usability testing, the application was distributed to users in separate locations and
asked for screenshots of the application. A small introduction about each feature helped
the users understand and use the application with ease. The application gave location
details for different user locations. It was checked on different Android versions (4.0.4,
4.1.2, 4.3) as well. It gave some package parsing issues when checked with the latest
Android version 4.4 but after updating the Android 4.4 operating system to the latest
version, it worked well.
76
4.6 GIS for Emergency Management
Most of the data requirements br emergency management are of a spatial nature and canhe
located on a map. Proposed architecture focus on how data is acquired, displayed, and
utilized in all aspects of public safety programs. This section will illustratehow GIS can
fulfill data requirement needs for planning and emergency operations andhow GIS can
become the backbone ol emergency management
All phases of emergency management depend on data from a variety of sources.
Theappropriate data has to be gathered, organized, and displayedlogically to determine
thesize and scope of emergency management programs. During an actual emergency it
iscritical to have the right data. at the right time, displayed logically, to respond and
takeappropriate action. Emergencies can impact all or a number of government
departments. Proposed system can be implemented to gather such kind of data very
accurately and efficiency.
4.6.1 PJanning
Emergency management programs begin with locating and identifying potentialernergeney
problems. Using a GIS, officials can pinpoint hazards and begin to evaluatethe
consequences of potential emergencies or disasters. When hazaids (earthquake faults, lire
hazard areas, flood zones, shoreline exposure, etc.) are viewed with other map data (streets,
pipelines, buildings, residential areas, power lines, storage facilities, etc.),
77
emergencymanagement officials can begin to formulate mitigation, preparedness,
response, and possible recovery needs. Lives, property, and environmental values at high-
risk from potential emergency or disaster become apparent. Public safety personnel
canfocus on where mitigation efforts will be necessary, where preparedness efforts must
hefocused, where response efforts must be strengthened, and the type of recovery
effortsthat may be necessary. Bethre an effective emergency management program can
beirnplcmented, thorough analysis and planning must be done. GIS facilitates this
proccssby allowing planners to view the appropriate combinations of spatial data
th ro ughcomputcr-generated maps -
4.6.2 Mitigation
As potential emergency situations are identified, mitigation needs can be cleteniiined
andprioritizcd. In the case of an earthquake, what developments are within the
prinlaryimpact zone of earthquake faults? Based on the expected magnitude of an
earthquake, characteristics of soils, and other geologic data, what damage may occur?
What facilitiesrequire reinforced construction or relocation? What Facilities are in high
hazard areas(key bridges, primary roads, freeway overpasses, hospitals, hazardous material
storagefacilities, etc.)? Mitigation may include implementing legislation that limits
building inearthquuke or hood zones. Other mitigation may target fire-safe roofing
materials inwild land fire hazard areas. Values at risk can be displayed quickly and
efficientlythrough a GIS. utilizing existing databases linked to geographic features in GIS
rnakcsthis possible. Where are the fire hazard zones? What combination of features
(forexample, topography, vegetation, and weather) constitutes a fire hazard? A GIS can
identifyspecific slope categories in combination with certain species of hlammahle
vegetationnear homes that could be threatened by wildfire. A GIS can identify certain soil
types inand adjacent to earthquake impact zones where bridges or overpasses are at risk. A
GlScan identify the likely path of a flood based on topographic features or the spread of
acoastal oil spill based on currents and wind. More importantly, human life and
othervalues (property, habitat, wildlife, etc.) at risk from these emergencies can be
quicklyidentified and targeted ftr protective action.
78
4.6.3 Prepareclness
Preparedness includes those activities that prepare for actual emergencies. GIS canprovidc
answers to questions such as Where should fire stations be located if a fiverninuteresponse
time is expected? How many paramedic units are required and whereshould they be
located? What evacuation routes should be selected if a toxic cloud orplurne is accidentally
released from a plant or storage facility based on different windpatterns? How will people
be notified? Will the road networks handle the traffic? Whatfacilities will provide
evacuation shelters? What quantity of supplies, bed space, and so forth, will be required at
each shelter based on the number of expected evacuees?
4.6.4 Response
GIS can provide one of the primary components for computer-aided dispatch (CAD)
systems. Emergency response units based at fixed locations can be selected and routedfor
emergency response. The closest (quickest) response units can be selected, routed, and
dispatched to an emergency once the location is known. Depending on theemergcncy, a
GIS can provide detailed information before the first units arrive. Forexample, during a
commercial building fire, it is possible to identify the closest hydrants, electrical panels,
hazardous materials, and floor plan of the building while en route to theemergency. For
hazardous spills or chemical cloud release, the direction and speed ofiuiovcmcnt can be
modeled to determine evacuation zones and containment needs.
4.6.5 Recovery
Recovery efforts begin when the emergency is over (immediate threat to life, property and
the environment). Recovery efforts are oflen in two phases, short term and long term.
4.7 Discussion
To overcome communication gap between emergency teams ifltro(lUce this system to
facilitate the both reporting and analysis part.
Indicate teams live movements on Google map using coordinates which sending from
tracking devices. Once people on the ground we (10 not have accurate locations of them,
thercthre have introduced live tracking system for the team, this GPS embedded devices
79
send location using latitude and longitude in every two seconds, using those receiving data
system display the location on Google map.
Handling large number of incoming data to the server. I used following methods to
Analysis and planning are critical activities that must be carefully completed before
beginning GIS implementation. This causes a conflict, as creating detailed requirements
and committing to the design of a system in a certain way. The main feature of this
approach is that user input is taken into account throughout the development process of the
system.
System design and implementation are occurring; the organizational issues that facilitate
the design and affect the implementation and adoption of the GIS must also be addressed.
he key to success is coordinating all of the goals, activities, and impacts
Quality of service issues also need to be considered when designing such web application.
A user-centric approach the design of a system is paiticularly important when it
developing. Systems require that user interfaces facilitate universal accessibility. This kind
of accessibility can only be achieved through knowing the potential users of a system and
developing the technical requirements of the system to cater to the needs of these users.
Developing such a web application required to study relevant type of web application and
software. I obtained some details of the commercial soflware and services from web sites
or quotes. Following Table 4.3show some findings.
80
Category Closed Source Open Source
81
Chapter Five
CONCLUSION AND RECOMMENDATION
5.1. Introduction
Initially mobile phones were developed only for voice communication but now days the
scenario has changed, voice communication is just one aspect of a mobile phone. There are
other aspects which are major focus of interest. Two such major tactorsare web browser
and G1S services. Both of these functionalitics are already implemented but are only in the
hands of manufacturers not in the hands of users because of proprietary issues, the system
does not allow the user to access the mobile hardware directly. But now, after the release
of android based open source mobile phone a user can access the hardware directly and
design customized native al)plications to develop Web and GPS enabled services and can
program the other hardwarecomponents like camera etc.
The use of mobile communication devices, such as smartphoncs and cellular phones, for
field data collection is increasing due to the emergence of embedded Global Positioning
Systems (GPS) and wireless Internet access. Accurate, timely and convenient field data
collection is required for disaster management and a quick response during emergencies. In
this project. the utilization of wireless Internet access and smartphones in field data col-
lection is handy and timely manner. Moreover, the construction of Web-GIS provides a
pre-cletined user-friendly Web-based survey form and coordinate inlonnation from mobile
devices, which dramatically improved the finding of locations and entering of data during
the field work. The Web-GIS also collects, integrates and processes all field data entered,
which eliminates data handling tasks after the field survey. Due to the real-time
information approach, the results can be viewed, queried and analyzed instantly, based on
up-to-date intorma-tion. This is ideal for use in disaster and emergency response systems
and in meteorological data collection. The system itself is reusable and updatable for
various field data collection purposes.
The LBS application can help user to find hospitals, school, gas filling station or any other
facilityof interest indicated by user within certain range. Just like a GPS device its location
82
will also be updated as soon as user changes his/her position. These all capabilities arc
used for the disaster situation reporting mobile application.
The primary objective of the research was to build an Android application surviving by
information and communication requirements envisaged by discussions with the disaster
management teams. The functionality proposed for the mobile application addresses the
elicited requirements. Each function has a feature in the application dedicated to it. Also
utmost cai-e has been given to make the application as user-friendly as possible. Textual
detail has been kept minimal on the screen but still each feature has been explained well.
The application involves various data sources to make predictions available.
And also web based online system has four main Web GIS functions
Therefore this system has developed for WebGIS project to fulfill the requirements highly
expecting by the geospatial data collectors. Furthermore it is evident that disaster needs
maps for different purposes within its Operational command and each requirement is to
cater for a specific purpose. The digital base in GIS environment facilitates the creation of
different types of maps to meet specific user needs without clustering with unwanted
details. This web application facilitates the viewer to mark spatial information on need to
know basis either at command headquarters or in the field area.
In order to meet the approach stated GIS web based application has been developed using
php, html, dhtml, xhtml, Javascripts, ASP.NET, Web server installation and configuration,
Database configuration and designing using Mysql, Security.
O.)
Web based GIS application programming interfaces allow developers to utilize the power
of displaying geographical information without having to create complex mapping
soflware themselves. Developers can use these web services to specify how they want
maps to be displayed. All of the specialist knowledge of having to draw the maps is
The Internet uses a client server approach for distributing information. lnft)rmation is
stored and processed on servers and then sent to a client when it is requested. This process
is usually camed out to send and the data from the develop system. APIs provide access to
GIS functionality that has been developed, when a client sends a request to an API, the
server passes this request to the program for processing. When the program responds,
l-ITML-forrnatted results are sent back to the server, and subsequently to the client's
browser.
The most important technical factor to be determined is the architecture of system. The
system architecture designed such a way to deal with major components of a system and
interact with each other. In order to develop and display the full architecture of a system
each of these components has been briefly descnbed in more detail in Technical
Innovation chapter.
5.2. Recommendation
Given that the requirement for enhanced location inlormation does not have a high priority
within the emergency organisations consulted, and that the costs of implementing a higher
accuracy system would be high there appears to be no clear cost-benefit justification for
significantly modifying the existing regulatory arrangements. It is therefore recommended
that this situation should be reviewed at regular intervals, ie annually, in order to assess
whether the user requirement is increasing in priority and also to assess whether the
developing technologies are becoming sufficiently pervasive and affordable.
WebGlS database and associated web applications will have the power to extend well
beyond environmental investigations. Thus this system incorporating all relative data into
84
the database to include not only ground analysis but also decision making process.
Therefore, the technology architecture is available for this project to become a reality and
grow into an entirely new fonn of WebGIS system.
ArcGis is well known software dominating in Gis field of duties. It required knowledge to
handle the software and good hi-end computers to process in smoothly.
For this development I have develop my own Map engine, because closed source required
more money and required to update according to software owners requirement, Open
source software can be neutralized but required more knowledge and hard to configure.
This web application is very simple but comprehensive system.
References
Anon, 2011 Native and HTML5 : What s the difference? Comparing Native Apps With
HJML5; What is the rig/il approach for your organisation, pp. 1-11
Beaubrun, R., Moulin, B. & Jabeur, N., 2007. An Architecture for Delivering Location-
Based Services. , 7(7), PP 160-166.
Braun, R. ci al., 2013. Community health workers and mobile technology: a systematic
review of the literature. PLoS ONE, 8(6), p.e65772. Available at:
http://www.ncbi.nlm.nih.gov!prne/articles/PMC3680423/pdf/pone.0065772.pdf
Beaubrun, R., Moulin, B. & Jabeur, N., 2007. An Architecture for Delivering Location-
Based Services. ,7(7), pp.160-166.
Braun, R., 2013. Community health workers and mobile technology: a systematic ieview
of the literature. PLoS ONE, 8(6), p.e65772. Available at:
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3680423/pdf/pone.0065772.pdf.
Couper, M.P., 2005. Technology Trends in Survey Data Collection. Social Science
Computer /?evievi', 23(4), pp.486-501
Eleiche, M.A. and B. Markus 2011, Network Analysis Methods for Mobile GIS. 2011,
University of West 1-I ungary
86
Fajardo, J.T.B. and C.M. Oppus,2010, A mobile disaster management system using the
androicitechnologyWSEAS Transactions on Communications, 2010. 9(6): pp. 343-
353.
Fischer, Henry W., III. 1998. The Role ol' the New Informatioii Technologies in
Emergency Mitigation. Planning. Response and Recovery" Disaster Prevention and
Management 7 (1): 28-3 7.
itu, 2015. ICT Facts & Figures. The World in 2015. ,p.6.
International Telecommunication Union. The World in 2014: 1CT Facts and Figures, 2014
Accessed September 22. 2014. - pages 10
Karnatak, l-1.C., 2012, Spatial mashup technology and real time data integration in geo-web
application using open source GISa case study for disaster management. Geocarto
International,. 27(6): pp. 499-514.
Kevany, M.J.2005, Geo-int'ormation for disaster management: lessons from 9/11, in Geo-
in formation for disaster management, Springer. pp. 443-464
Kohli, S.,20 11 , Sahana Eden Essential Guide, Google Summer of Code Documentation
Summit, Mountain View, USA, 1 8-20 October 2011, publisher: Lulu Enterprises.
2011, Inc.
Kushwaha, A. and Kushwaha. V., 2011. Location Based Services using Android mobile
Operating System.pdf. international Journal o/Advances in Engineering &
Technology, 1(1), pp. 1 4-20.
Kushwaha, A. and Kushwaha, V., 2011. Location Based Services using Android mobile
Operating System.pdf. international Journal of Advances in Engineering &
Technology, 1(1), pp. 1 4-20.
87
Ma, L., Gu, L and Wang, J., 2014, Research and Development of Mobile Application for
Android Platform. international .Jow'nal oJMultimedia and Ubiquitous Engineering,
9(4), pp.187l98. Available at:
littp://www,sei-sc.org/iouriials/IJMUE/vo]9 iio4_2014/20.pdf.
Monzavi, A. and Darwish. R., 2014. Comparison of HTML5 and Native Client
Development on Mobile Platforms. , (May).
Palen, L., Vieweg, S., Sutton, J., Liu, S., Hughes, A. (2007). Crisis Informatics: Studying
Crisis in a Networked World. Proceedings of the Third International Conference on
E-Socia! Science, Ann Arbor, Ml, Oct 7-9, 2007.
Pro ject,T.A.O.S.AndroidDevelopmentAvailablefi'orn:
http://developer.androicl.com/training/index.html .[Accessed 14/11/201 5]
Practical Applications of Agents and Multi-Agent Systems. 2013, Springer. pp. 190-201.
Qian Wang and Ralph Deters 2010. Mobile devices, scalahil- ity amp; digital ecologies. In
2010 4th IEEE Interna- tional Conference on Digital Ecosystems and Technologies
(DES]), pages 124-129, April 2010. -* pages 10, 11
Richter, S. and M. Flammitzsch,201 3. Development otan Android App for notilication and
reporting of natural disaster such as earthquakes and tsunamis. in EGU General
Assembly Conference Abstracts.
Shao, Z. ,2011.A Rapid and Reliable Disaster Emergency Mobile Communication System
via Aerial Ad Hoe BS Networks. in Wireless Communications, Networking and
Mobile Computing (WiCOM), 2011 7th International Conference on. 2011. IEEE.
88
Sung, S.J., 2011. How can we use mobile apps for disaster communications in Taiwan:
Problems and possible practice. 8/h International Telecommunications Society (iTS)
Asia-Pacific Regional Conference. Available at:
litti)://www.ecoiistor.cu/handlc/I 0419/52323.
The, ON., Of, P. & Networked, T.H.E., 2015. Mobility Report. Eicscon MobililyReport.
Tsai, M.-K. and N.-J. Yau.2013, Improving information access for emergency response in
disasters. Natural Hazards: pp. 1-12.
Tsou, M.-H. and C.-H. Sun,2006, Mobile GlScrvices applied to disaster management.
Dynamic and Mobile GIS: Investigating Changes in Space and Time,
Volker Paclke, Christian Reimann, and Waldemar Rosen- bach 2003 . A visualization
design repository for mobile de- vices. In Proceedings of the 2nd International
Conference on Computer Graphics, Virtual Reality, Visualisation and Interaction in
Africa. AFRIGRAPH '03. pages 57-62, New York, NY, USA, 2003. ACM. -* pages
11
Virrantaus, K., Markkula, J., Garmash, A., Tcrziyan, V., Veijalainen, J., Katanosov, A., and
Tirri, H, 2001. Developing gissupported location-based services. InWeb information
Systems Engineering (2001), IEEE, pp.6675.
89
Appendix
package lk.defence.dir;
import j ava.io. ByteAlTayOutputStrcarn
import java.io.FiIc;
import java.io.FilcNotFoundExccption;
import java.io. lOException;
import java.io.InputStream;
import java. security. Publi eKey;
import j ava.text. SimpleDateFonnat;
import java.util.ArrayList;
import j ava.util . Calendar;
import java.util.List;
import lk.defencc.dir.db.DbHe]per;
import 1k .defence.dir.poj o. DenguData;
import lk.defence.dir.pojo. Dsd;
import lk.defnce.dir.pojo.Gnd;
import lk.defence.dir.pojo.Rowltern;
import 1k .defence.dir.uti I Custom ListVicwAdaptcr;
import Ik.defence.dir.util .NetworkChcckUtilDisaster;
import android.app.Activity;
import android.app.AlcrtDialog;
import android.app.ProgressDia]og;
import android.contenl.ContentValucs;
import android.content.Context;
import android .content.Dialoglnterface;
import android.content.lntent;
import android.content.SharedPi-efrences;
import android.databasc.Cursor;
import android.database. sqlitc. SQLitcDatabasc;
import android graphics. Bitmap;
import android graphics. BitmapFactory;
import android. location .Criteria;
import android. location. Location;
import android.Iocation . LocationListener;
import android.location. LocationManager;
import android. location. LocationProvider;
import android.nct.Uri;
import android.os.Bundlc;
import android.os. Environment;
import android. preference. PrcferenccM anager;
import android.provider. MediaStore;
import android.provider. MediaStorc. Images;
import androi d.telcphony.TelephonyManager;
import android .tcxt. Editable;
import android.texLTextWatcher;
import android.ut1l.Base64;
import android .view. Layoutlntlater;
import android.view.Mcnu;
import android.view.View;
import android.vicw.VicwOnClickListener;
import android .view.VicwGroup;
import android.view.Window;
import android.widget.AdapterView;
import androidwidgct.AdapterVicw.OnitemClick Listener;
import android.widget.AdapterView.OnitcmSclectcd Listener;
import android.widget.ArrayAdapter;
import android.widget. BaseAdaptcr;
import android.widget.Button;
import android.widgct.DatcPicker;
import android.widgct. EditTcxt;
import aiidroid.widgct. ImageView;
import androi d.widgct. ListVicw;
import android.widget.Spinner;
import android .widget.lextView;
import an(li-oidwiclgetToast;
import com.googlc.android.gms.rnaps.model.LatLng;
11
private EditText injuredEditetext;
private EditText misingEdittext;
private EditText fullyEittext;
private EditText partialyEdittext;
private EditText safelocEdittext;
private EditText farnilyNosEdittext;
private EditText safepeopleEdittext;
private Button dateButton;
private Button saveButton;
private Button ahoutusButton;
private Spinner gendcrSpinner;
private Spinner sickcatogorySpinner;
private Spinner disaster;
private Spinner dsdspin;
private List<String> dsd;
private List<Dsd> dsd!ist;
private ListView gndListVicw;
private EditText gndEditText;
private EditText housenoEditText;
private TextView locationTextView;
private TextView id;
private TextView name;
1/ photo
private Button tabephotoButton;
private Un irngUri;
private ImageVi ew photolrnagcVicw;
private Bitmap photo:
private I nputStrearn inputStream;
private SharedPreferences sp;
private String path;
private String s;
private static final mt CAM_REQUEST = 1313;
private String b="NULL";
itt
/1 Gender Spitier
/1 private List<String> GenderDescripter;
private String selected Di stri ctdiscripter;
private String selectedDS DDescripter;
private i ft selectedGenclerPosition;
1/ Sick category spiller
private Li st<String> sickeatogaryDescripter;
private String selectcdprovinceDescripter;
private String selectedDisasterDescripter;
/1 private mt sd eetedsi ckeatogaryPosition;
private An-ayLi st<Gnd> dengudatagnd
private Li st<S tring> strgndname;
/1 private ArrayList<DenguData> dengudatagndlist;
private List<Rowltern> rowlterns;
private Li st<Rowltern> rowlternstwo;
private I ist<RowItern> rowlternsdisast;
String] strDist;
Di sasterDataForm activity = this;
@Overridc
public void onCreate( Bundle savedlnstanceState)
requestWi ndowFcature( Window. F EAT1J RE_NO_TITLE);
super.onCrcatc(saved InstanceState);
overridePendingTransition(R.anim.fadein, R.anim.fadcout);
setContentView( R.layout.activity disaster_data_form);
/1 loadDistrict();
injuredEditetext=(EdilTcxt)findViewByld(R.id.injuredcdittcxt);
misingEdittext=(EditText)findVicwByld(R.id.missingedittext);
fullyEittcxt=(EditText)findViewByld(R.id.fullycditext);
partialyEdittext=(EditText)findViewByld(R.id.partiallyedittcxt);
safclocEdittext=(EditText)findViewByld(R .id.safelocedittext);
farni!yNosEdittext=( EditTcxt)find ViewByld( R.id.familynosedittext);
safepeopleEdittext=(E(IilText)iindViewByld(R .id.saftpeop1ecdittext);
V
affectfamilyedittext = (EditText) find VicwByld( R.i(1.niceditText);
affectdeathedittext = (EditText) find ViewByld(R.id.age edittext);
housenoEditTcxt = (EditText) find ViewByld(R.id.houseno_edittext);
SI) = PretrenceManagcr.getDefaultSharedPreferences(this);
// Photo
tabephotoButton = (Button) find ViewByld(R.id.photo);
tabephotoButton .setOnClickListener(thi s);
photolrnageVicw = (IrnageView) find ViewByld(R.id.imageViewl);
II //////////////////end photo
7/ search gnd
gndListView = (ListView) findViewByld(R.id.gndlistVicw);
gndEditText = (EditText) findViewByld(R.id.gn(leditText);
dcngudatagnd = new ArrayList<Gnd>Q;
gndEditText.addTextChangedListener(new TextWatcher()
vi
locationTcxtVicw = (TextView) findVicwByld(R.id.!ocation_textView);
dateButlon - (Button) findVicwByld(R.id.(Iate_hutton);
dateButton .setOnCl ickListener(tliis);
II Sick categary spiner
sickcatogorySpinner = (Spinner) find ViewByld(R.id.sickcatogory_spinncr);
sickcatogorySpinner.setOnitemSelected Listener(this);
Il//Disaster spiner
disaster = (Spinner) find ViewByld(R.id.disastcrspin);
disastcr.setOniternSel ected Listener(this);
II /
dsd = new ArrayList<String>O;
dsdlist = new ArrayList<Dsd>O;
dsdspin = (Spinner) find VicwByld(R.id.dsdspiner);
dsdspin.setOn LtcmSelectedListener(this);
disastcr.sctAdapter(new CustomListViewAdaptcr(DisasterDataForm.this,
R.layout.row, rowltemsdisast));
vii
private void loadDistrict() {
Systeimout.println("selected provice :' + selectedDistrictdiscriptcr);
sickcatogorySpinner.setAdapter(new CustornListVicwAdapter(
DisasterDataForntthi s, R .layout.row, rowlternstwo));
II
else if (selectedDistrictdiscripter.equals("North_Ccntral_Province"))
strDist =new String[] "Anuradhapura", "Polonnaruwa" ;
String[] substrDist = "Anuradhapura", "Polonnaruwa" };
mt anHmagestwo [] = R.drawable.bul let triangle blue,
R.drawable.bullettriangl c_blue ;
else if (selcctcdDistrictdiscriptcr.equals('Southern_Province"))
strDist new String[] "Galle", "Matara", "Hambantota" };
String[] suhstrDist = "Galle", "Matara", "Harnbantota" ;
mt arr imagestwo[] = R.drawahle.bullet triangle_blue,
R .drawabl ebul let iriangi c_blue,
R.drawabl e.bullet triangl c_blue
else i t (se!ectedDistrictdiscripter.equals("Easteni_Province")) {
strDist =new String[] "Trincomalee", "Batticaloa", "Ampara" J;
String[] suhstrDist = { "Trincomalee", "Batticaloa", "Ampara" };
nit air imagestwo[] = R.drawable.bullet triangle_blue,
R drawahle.hul let triangl c_blue,
R.drawahle.hullct triangle blue };
sickcatogorySpinner.setAdapter(new CustomListViewAdapter(
DisasterDataForm.this, R.Iayout.row, rowltemstwo));
lx
R.drawable.bullet triangle blue,
R.drawable.bullet triangle blue };
sickcatogorySpinncr.setAdaptcr(new CustoinListVicwAdapter(
DisasterDataFonn.this, R.layout.row, rowltcrnstwo));
x
sickcatogorySpinner.setAdaptcr(new Custom Li stViewAdapter(
DisastcrDataForrn .this, R.layout.row, rowltemstwo));
else if (selectedDistrictdiscripter.equals("Saharagamuwa_Province'))
strDist new String[] 3, "Kegalle", "Ratnapura" };
String[] suhstrDist = { "Kegalle", "Ratnapura" ;
mt arr_imagestwo[] = R.drawahle.bul!et_triangle_hlue,
R.drawable.hullet triangle blue ;
else if (scicctcdDistrictdiscripter.equals("Uva_Province"))
strDist =new String[]{"Badulla", "Moneragala" };
String[] suhstrDist = { "Badulla", "Moneragala" }
mt air imagcstwo[] = R.drawable.hul let tn angle_blue,
R.drawable.bullet triangle blue ;
sickcatogorySpinncr.sctAdapter(new CustomListViewAdaptcr(
DisastcrDataForm this, R.layout.row, i'owltemstwo));
else
String[] stringstwo =
String[] suhstwo = { "
mt air imagcstwo[] = R.drawable.hullet triangle blue };
xi
rowltcrnstwo = new A rrayList<RowItem>;
for (mt ii = 0; ii <stringstwo.Iength; il++) {
Rowitem item = new Rowltern(arr imagcstwo[i 1], stringstwo[i 1,
substwo[i I]);
rowltemstwo.add(item);
sickcatogorySpinncr.setAdapter(new CustomListViewAdaptcr(
DisasterDataForm.this, R.layout.row, rowltemstwo));
}
}
@OvelTide
protected void onPause()
II TODO Auto-generated method stub
super.onPauseO;
locationManager.removeUpdates(this);
@Overri de
protected void onResume() {
II TODO Auto-generated method stub
super.onResumeO;
initilizeLocationListcning();
/1 Image
@Override
protected void onActivityResult(int requcstCode, mt resuitCode, Intent data) {
II TODO Auto-generated method stub
super onActivityResult(requestCodc, resuitCode, data);
System.out.println("onActivityresult");
if(requestCode == CAM_REQUEST)
try
Bitmap thumbnail = (Bitmap) data. getExtrasQ.get("data");
xii
//photolmageVi ew.setlniageBitmap(thurnbnai 1)
ii CALL THIS METHOD TO GET THE IJRI FROM THE BITMAP
Uri tcmpUri = getlrnageUri(getAppli cationContcxtQ, thumbnail);
catch (Exception e)
/1 TODO: handle exception
c.printStackTraceQ;
else{
b='NU LL";
if (argO.getld() == R.id.disasterspin) {
/1 selectedGenderDescripter = GenderDescripter.get(arg2);
selectedDisasterDescripter = stringsDisaster[arg2];
// selectedGendcrPosition = arg2;
Systcrn.out.println("Disaster :" -I- selectedDisaslerDescripter);
/1 System out.pri ntln(selectcdGcndcrDescripter);
if (argO.getld() == R.id.dsdspiner) {
selectedDSDDescripter = dsd.get(arg2);
System.outprintln("DSD :"+selcctcdDSDDescripter);
xlv
if(v.getld() == R.id.date button)
show DatePopupQ;
if (v.getld() == R.id.photo)
else
System out. println( !b H- b);
if(v.getld() == R.id.save_button)
System.out.println("b + b);
if (checkFieldErnptyO)
xv
disasterdbData.setSafefmily(farnilyNosEdittext.getTcxtQ.toString);
disasterdhData.setSafeperson(safepeopleEdit1ext.getTcxtQ.toString);
disasterdh Data. set lmagepath(b);
disasterdh Data. set lnfccteddate(dateButton. getTextQ.toStringO);
1/ dengudh Data. setHouscno(housenoEditText.gctTextQtoStringO);
di sasterdb Data. set H ouseno( "00");
disasterdhData.sctGnd(gnd EditText.getTextQ.toStringQ);
disasterdhData.sctlnicino(getimei(this));
if(b.trim.equalslgnorcCase("NULL")) It
disasterdhData.setPhoto("null");
}clsc{
d isasterdb Data. set Photo( h);
I
1/ ///velidation
private boo] can check FieldEmpty() {
if(affectfawilye(liltext.getText.toStringQ.equals(""))
AlcrtDialog.Builder builder = new AlertDialog.Builder(
DisasterDataForm .thi s);
builder.sctTit]e("Empty F'icld")
.setMessage('lD Field Empty")
.sctCancclable(fhl se)
.seticon(R.drawable. iconflood)
,setNegativeButton( "OK",
new Dial og]ntcrface.OnC]ickListcner()
public void onClick(Dialoglntcrface dialog,
mt id)
affctfarni] yedittcxt.sctFocusablel nTouchMode(true);
affectfarnilyedittcxt,requestFocusQ;
dialog.cancelO;
xvi
AlertDialog alert = builder.createO;
alert.showQ;
else if (affectpcopleedittect.getText(JtoStringO.equals(")) {
AlertDialog.Builder builder = new AlertDia!og.Builder(
DisasterDataForm.this);
buildcr.setTitle("Empty Field?)
.setMessage( "Name Field Empty")
setCancclable(fiilse)
seticon(R.drawable. icon flood)
setNcgativeButton("OK",
new Dialoglnterface.OnClick Listener()
public void onC!ick(Dialoglnterface dialog,
ml id)
affcctpcopleedittect.setFocusablelnTouchMode(true);
affectpeopleedittect.requestFocusO;
dialog.cancel();
k \.
AlertDialog alert = builder.crcatcO;
alert. showQ;
else if (affcctdeatliedittext.getTcxt,toStringO.equals("))
AlertDialog.Builder builder = new AlcrtDia!og.Buildcr(
DisasterDataForm this);
huildcr.setTit!e("Ernpty Field")
sctM essage(" Age Field Empty")
setCancelablc(false)
.scticon(R.drawable.iconflood)
.setN egativeButton("OK",
new Di aloglnterface.OnClickLi stcner() {
public void onClick(Dialoglntcrface dialog,
mt id)
affctdeathedittcxt.setFocusablelnTouchModc(true);
af!ctdeathcdittext.requestFocusQ;
dialog.cancelQ;
xvii
alert.showQ;
cisc if (i nj uredEditctext.getText.toStringO.equais(")) {
AlertDialog.Builder builder = new AlertDialog.Builder(
DisasterDataFomi .this);
builder.setTitic("Ernpty Field")
.setMcssagc("Gnd Field Empty")
.setCancel able( false)
.seticon(R.drawable.iconfiood)
.setNegativcButton("OK",
new Di aloglnterfacc.OnCl ickListener() {
public void onClick(Dialoglnterface dialog,
lilt id)
injured Editetext.sctFocusahlelnTouchMode(true);
injuredEdi tetext.rcquestFocusQ;
dialog, cancel 0;
xviii
else if (locationTextVicw.getTextQ.toStringQ.equals(")) {
AlertDialog.Builder builder = new AlertDialog.Builder(
DisasterDataFonmthis);
builder.setTitle("Ernpty Field")
setMessagc(
"Please restart the programe to aquire the location")
setCancelablc(fal Se)
seticon(R.drawab!e.iconflood)
setNegativeButton("OK",
new Dialoglntcrface.OnCl ickListener() {
public void onClick(Dialoglnterface dialog,
intid)
locationTextView
setFocusablelnTouchMode(true);
locationTextVicw.requestFocusQ;
dialog.cancelO;
fini shO;
}
I);
AlertDialog alert = builder.createQ;
alert.showQ;
} else
System.out.println("True");
return true;
System.out.println(" False");
return false;
xix
locationManager.removelJpdates(DisasterDataForrn .this);
locationTcxtView.setText( Double.toString(loc.latitude) +"
+ Double.toString(loc.longitudc));
progressDi alog.dismi ssQ;
I/function
pr vate void showDatePopup()
/1 Add layout to POPUP
Layout I nfiater layoutlnfl ater = (Layout Infiater)
getSystemService( LAYOUT_IN FLATERS ERV ICE);
final View dateOIlncidentView = layoutlnfiater.inflate(
R .layout.date_pi cker_popup, null);
AleriDialog. Builder builder = new AlertDialog.Builder(this);
huilder.setView(dateOfl nciclentView);
bui lder.setM essage("Sel ect Incident Date");
builder.setCaneelable(false);
hui I der. setPositi veB utton( "Done",
new Dialoglntcrthce.OnClick Listener()
public void onClick(Dialoglnterface dialog, jut which) {
1/ TODO Auto-generated method stub
DatePicker dateOfincldentdatePicker = (DatePicker) dateOflncident View
!indViewByld(R.id.dateofineident_datcPicker);
mt dayOfMonth = dateOflneldentdateP icker
xx
getDayOfM onthQ;
mt month = dateOtincldentdatePicker.getMonthO;
month = month + I
mt year = dateOfincldentdatePicker.getYearO;
dateButton.sctText(year + "-" + month + "-"
dayOfMonth);
U;
AlertDialog alert = builder.creatcQ;
alert.show();
xxi
clata.put("irneino", dengudata.getlmeinoQ);
1/
data.put("safe_person", dengudata.getCurrcntdateO);
data.put("safe_famil y", dengudata.getln tcteddatcO);
data,put("nos", dengudata.getS ickcategoryO);
data.put("damage_partialy", dcngudata.getLatitudeQ);
data.put( "damage fully", dengudata.getLongitudeQ);
data.put( "missing", (lcngudata.getPationN ameO);
data.put("injured", dcngudata.getPationNICO)
data.put( "disaster", dcngudata.getAgcQ);
data.put("dsd", dengudata.getGenderO);
data.put("district", dengudata.getGndQ);
data.put("province", dcngudata.getHousenoQ);
data.put("injured", dengudata.getPationNlCO);
data.put("disaster", dengudata.getAgeQ);
data.put("dsd", dengudata.getGenderO);
data.put( "district", dengudata.gctGndQ);
dala.put( "province", dengudata. getHousenoQ);
//data.put(" imeino", dcngudata.getlmeinoQ);
// photo
data.put("image", dengudata .getPhotoQ);
data.put("scnt", 0);
long id = db.insert("dengudctail". null, data);
dh.sctTransactionSuecessfuiO;
dh.cndTransactionQ;
(lb. ci osc);
Toast.makeText( DisastcrDataForm.this, "Data Saved in Local DB",
Toast. LENGTH LONG).showQ;
dengud ata . set ld(i d);
if
(NetworkChecklitil Disaster.isConnected(thi s)) {
ServerCoinmunicatorDisaster serverConi = new ServerCommunicatorDisasterQ;
serverCorn. addSitRep(dengudata, this);
progressDialog.disrnissQ;
/7 Yes no
AlertDialog.Builder builder = new AlertDialog.Builder(
DisasterDataFonn .thi s);
builder.setTitle( "Close Project")
.setMessage("Do you want to Enter another record?")
.setCancclable(false)
.seticon(R.drawable.mosquito)
.setPositiveButton("Yes",
new Dialoglnterface.OnClickListener() {
public void onClick(Dialoglnterface dialog,
mt id) {
clearFieldQ;
dialog.cancelQ;
}
.setNegativeButton("No",
new Dialoglnterface.OnClickListener() {
} catch (Exception e) {
1/ clear data
private void clearField() {
affectpeopleedittect. sctText(");
affectfamilyedittext.setText(");
affectdeathedittext.setText(");
dateButton.setText(");
housenoEditText.setText(");
gndEditText.sctText("");
show result
private void showResult() {
class CustomAdapter extends BascAdapter {
public mt getCount()
/1 TODO Auto-generated method stub
return dengudatagnd.sizeQ;
return dengudatagnd.get(argO);
return 0;
xxiv
String gndnam e = strgndname get(arg2);
gndEditTcxt.setText(gndname);
gnd Li stView.setVisibil ity(View.GONE);
return view;
try
gndListView.setVisibility(View.VISIBLE);
dengudatagnd .clearQ;
strgndnarnc.clearQ;
DbHelper dbl-lelper = new DbHelper(this);
SQLiteDatabase db = dbHelper.openDataBascO;
String where =
String whereArgs[] = search.split("
for (mt i = 0; i < whereArgs. length; i++) It
whereArgs[I] hI%?1 + whereArgs[l] + "%";
=
if(wherc.lcngth() > 0) {
where += "AND gndnarne like ?";
else {
where = "gndname like '1";
xxv
/1 ct.s(id);
ct.setGnd(gndnarne);
dengudatagnd. add(ct);
strgndname.add(gndname);
}
c.closeO;
db.closeQ;
dbHelper.close;
//showResultQ;
} catch (Exception e) {
e.printStackTraceQ;
I//load dsd
try
dsdlist.add(new DsdO);
DbHelper dhHelper = new DbHelper(this);
SQLiteDatabase db = dbHelper.openDataBaseO;
/1 This is for where close
Cursor c2 = null;
while (c2.rnoveToNextQ) {
mt id = c2.getlnt(3);
xxv'
String distrct = c2.getString(0);
String dsdst = c2.getString(2);
c2.closeO;
db ci oseO;
A rrayAdaptcr<Stri ng> baseAdapter = new ArrayAdapter<String>(this,
an(iroid. R.layout.sirnple spinner_item, dsd);
II haseAdapter
1/ .sctDropDownViewResource(android.R.layout.sirnpie_spinner_droPdOWfl_item)
dsdspin.setAdapter(baseAdaptcr);
catch (Exception e)
c.printStackTraceQ;
// II
xxv"
Sync Manager
package lk.defence.dir.util,
import javautil.ArrayList;
import java.utiLList;
Cursor c = null;
xxviii
String patimcino=c.getString(c.getColumn!ndex("imeino"));
Stri rig patGnd=c.getString(c.getColumn lndex( "gnd")):
String pati louseno=c.getString(c.getColumn lndex("houseno"));
String patlnfectdate=c,getString(c.getColurnnlndex("infecteddate"));
String patcui-renidate=c.getString(c.getCoumnlndex("currentdate"));
String patlatitude = c.getString(c.getColumnlndcx('lat"));
String patlongitude = c.getString(c.getColumnlndcx("lon"));
String disaster province = c.getString(c.(,etColumnlndcx("province"));
String disaster district = c.getString(c.getColuninln(lex(t district));
String disaster dsd = c.getString(c.getColumnlndex(T'dsd'));
String disaster disaster = c.getString(c.gctColuinnlndex("disaster"));
System.out.println(tDisaster'+disaster_(Iisaster );
String disaster_afect_family = c.gctString(c.getColumnlndex("nic"));
String disaster afect_people=cgetString(c.getColumnlndex(narnc));
String disaster afect death=c.getString(c.(,etColumnlndex("age"));
String disaster afect inj ured=c.getString(c.getColumnlndcx("injured"));
String disaster afect missing=c.getString(c.getColumnlndex("missing")):
String disaster damage fully=c.getString(c.getColumnlndex( (1amage_fully )),
String disaster damagepartialyc.getStnng(c.getColumnlndex(damage_partialy));
String disaster_sal_nos=c.getString(c.getColurnnlndex("nos"));
String disaster safe larnily=c.getString(c.getColumnlndex( safe family )),
String disaster safe_person=e.getString(c.gctColumnlndexCsafe_persOfl"));
/1
DenguData disast = new DenguDataO;
eli sast. set I d( id)
disast. selPationNarne( disaster ateci people):
disasLsciAftectedPeople(disasteraiect_people):
disasi.sctPationN IC(disastcraf'cctthnuily):
disast.setAffectcdfamily(disasterafcct family);
disast.setProvince(disastcr province);
disast.setDistrict(disaster district);
disast.setDsd(disasterdsd);
disast.setDisaster(disaster disaster);
disast.setAffectedlnjured(disasterafect_injured);
disast.setA iieetedDeath(disasterafectdcath);
disast.setAfictedMissing(disaster_afect_missing);
disast.setDamagefully(disaster_damage_fully);
disast.setDamagePartialy(disaster_damage_partialy);
disast.sctSal thmily(disaster safe family):
di sast.setSaf e_person(di saster safe person);
disast.setNos((Iisaster safe nos);
elisast.setSickcategory(patcatogory);
disast.setLatitude(patlatitude);
disast set Longitude(patlongitude);
disast.setGendcr(patgender);
disast.setlnfecteddate(patlnfcctdate);
disast . setCurrentdate(patculTentdate);
di sast.setAgc(d isasterafect_death);
di sast . setA ffected Dcath(di saster afect death);
disast.setlrneino(patirneino);
disast.setHouseno(patHouseno);
disast.sctGnd(patGnd);
disast.sctPhoto(irnage);
//sitrcp . set
denguDatasyrnanger.add(disast);
catch (Exception e) {
e.printStackTraceO;
II
package lk.defnce.dir.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.Networklnfo;
xxx
System .out.println("println network uti I class fired")
Networklnfo wifiNetwork = cm
.getN etworklnfo(ConncctivityManager.TYPE_WI Fl);
if(witiNetwork null)
islnternetAvailable = wifiNetwork,isCorinectedO;
Networklnfo mobileNetwork = cm
.getN etwork Info(ConnectivityManager.TYPE_MOBILE);
if(mobileNetwork 1= null) {
//islnternetAvailahle = mobileN etwork.isConnectcdOrConnectingQ;
islnternetAvailable = mohileN etwork. isConnectedO;
return isinternetAvailable;
package lk.defence.dir.dh;
import java. io. FileOutputStream
import java. io. lOExcepti on;
import java.io.lnputStream;
import java.io.OutputStream;
import android.content.Context;
import android .database. SQ LException;
import android .database. sql ite. SQ LiteDatahase;
import android.databasc.sqlite.SQLiteExceptiom
import android database. sqlite. SQ LiteOpenH el per;
catch (SQLiteException c) {
1/ database does't exist yet.
if(checkDB != null) {
checkDB.closeQ,
@Override
public synchronized void close()
if(myDataBase null)
m yDataB ase.cl oseQ;
super.closeQ;
@Ovei-i-i de
public void onCreate(SQLiteDatahase (Tb) {
@Override
public void onUpgrade(SQLiteDatabase dh, mt old Version, mt newVersion)
package lk.defence.dir;
import j ava.io. BufferedReader;
import java.io. ByteArrayOutputStream;
import java.io.lnputStream;
import j ava.io. lnputStrcam Reader;
import java.util.ArrayList;
import java.util.List;
import 1k .defence.dir.db.DhH elper;
import lk.defence.dir.poj o. DenguData;
import org.apache.http. 1-1 ttpResponse;
import org.apache.http.NameValucPair;
import org.apache.http.client.HttpClient;
import org.a1)ache.htt)C1iei1t.Cfltity.Url EncodedFonnEntity;
import org.apache.http.cli cnLmethods. HttpPost;
import org.apachc.http.impl.client.DefaultHttpClient;
import org.apaclie.http.iiiessage.BasicNai-neValuePail-;
import andl-oi(Lcontent.ContentValues;
import android. content. Context;
import android.datahase.sqlitcSQLiteDatabase;
import android.gi-aphics. Bitmap;
import android.graphics BitmapFactory;
import android .os.AsyncTask;
import android.util.Base64;
import android.widget.Toast;
OvciTidc
// Same as Run method on Thread
protected String do InBackground( Void... pararns)
1/ TODO Auto-generated method stub
String result = null;
try It
HttpPost httpPost = new HttpPost(
"http://slrider.com/sitrepphp");
System .out.println("Sick Catagary
disiData.getSickcategoryQ);
System.out.pri ntln( "1 nfectcd Date:"
distDaia.gctlnfccteddate() "name
+ distData.getPationName() + "age
+ distData.getAge() + "Catergory :"
+ distData.gctSickcategory() + "Latitude:
xxxiv
+ distDatagetLatitude() +" sex :"
+ distData.gctGencler() + "Longitude
+ distData.getLongitude() + " NIC :"
+ distData.getPationNlC() + " house no
+ distData.gctHouseno() -I- "GND
-F distData.getGnd() + "IMEINO
+ distData.gctlmeinoO);
System.out
xxxv
.gctlmeinoQ));
7/ imeirio
data.add(new BasicNameValuePair("gnd", distData.gctGndO));
if (distData.gctPhotoO.toStringQ.equals("flull))
data.add(new BasicNameValuePair("image't, "NULL"));
else
7/Bitmap image = BitmapFactory.decodeFile("assets/lcons/android/drawable-
rndpi/niark.png");
Bitmap image = BitniapFactory.decodeFile((listData.getPhotoO);
BytcArrayOutputStrearn stream = new ByteArrayOutputStream(
1 0240);
image.compress(Bitmap.CompressFormat.JPEG, 95, stream);
byte[] bytelmage = stream.toBytcArrayO;
encodedi mage = Base64.encodeToString(bytelrnagc,
Base64. DEFAULT);
System.out.println("IMAGE :" + encodeclimage);
httpPost.setEntity(new U rlEncodedForrnEntity(data));
FlttpClient httpClient = new DcfaultHttpClientQ;
HttpResponse httpResponse = httpCl ient.execute(httpPost);
I nputStream i nputStream = httpResponsc.getEntity()
getContcntQ;
BufferedReader bufferedReader = new BuffcredRcader(
new I nputStreamReader(inputStream));
StringBuilder respose = new StringBuilcicrQ;
String responselinc = null;
while ((responseline = buffere(fReader.readLineQ) != null)
respose.appcnd(responseline);
buffBredReadercloseO;
inputStreani .closeQ;
result = resposc.toStringQ;
catch (Exception e)
/1 TODO: handle exception
retuni result;
@OvclTide
protected void onPostExecute(String result)
7/ TODO Auto-generated method stub
super.on Post Execute(result);
System.out.println("Resu!t :" + result);
if(rcsuJt != null && result.cquals("success")) {
try {
System.ouLprintl n("Infected Date:"
+ distData.getlnfectcddate() + 'name
+ distData.gctPationNarnc() + "age
+ distData.getAge() + "Catergory
+ distData.getSickcatcgory() + "Latitude:
-F distData.gctLatitude() +" sex :"
+ distData.getGcnder() + "Longitude
+ distData.getLongitude() + "NIC :"
+ distData.gctPationNlC() + "IMEINO :"
+ distData.getlmeinoQ);
DbHelper dblIelper = new DbHclper(context);
SQLiteDatabase db = dhH elper.openDataBaseQ;
db.beginTransactionQ;
String[] whereArgs = new String[ I];
whereArgs[O] = " + distData.getldQ;
ContentValues data = new ContentValuesQ;
data. put("scnt", 1);
db.update( "dengudctail", data, "id=?", whereArgs);
db.setTransactionSucccssful 0;
db.endTransaction();
db.close0:
Sysiem.out.println(whcreArgs[O]);
Systern.out.println("Edit Record");
Toast.makeText(contcxt, "Disaster Data Send to Server",
Toast. LENGTH LONG).show0;
catch (Exception e)
c.printStackTracc0:
package lk.defcncc.dir;
import java.util.List;
import 1k .dcfence.dir. util .SyncManagerDisaster;
import android. app.Acti vityManager;
import android.app.ActivityM anager. RunningTask Info;
import android.content.BroadcastReceiver;
import android.content.ComponentN ame;
import android.content.Context;
import android.content. Intent;
import an(lrOid .net.ConnectivityManager;
import android.widget.Toast;
@Overridc
public void onReceive(final Context context, Intent intent) {
boolean noConnectivity - intciit.gctBoolcanExtra(
ConnectivityManagcr.EXTRA_NO_CONNECTIVITY, false);
System.out.println("CBR ConncctivityBroadcastReceiver constructor"-1-
ConnectivityMana(,,,er,EXTRA EXTRA_INFO);
if (noConncctivity)
Toast.makeText(context, "Disaster No Connection", Toast.LENGTHLONG).showQ;
System.out.printl n("No Connection");
else
Toast.makcText(context, "Disaster Connected", Toast.LENGTHLONG).showQ;
System .out.println( "Connected");
SyncManagerDisastcr syncn]aneger=new SyncManagcrDisasterQ;
syncmanegcr.sync(context);
return false;