Kanav Kushal Disaster Management:Main Page
From ACT4D Project Wiki
Natural disasters can occur anywhere anytime. What follows afterwards is a total chaos including loss of life, destruction of public property and communication infrastructure like cellular towers and network cables. In the absence of reliable modes of communication, the relief and rescue operations are severely limited. Sometimes, lack of timely action can lead to a huge loss of human life. Since we can‟t rely on the cellular networks, there is a need to develop some reliable applications for asynchronous data transfer over wireless networks like Wi-Fi. The portability offered by a mobile phone is unmatched, and it should be leveraged in communication during natural disasters. We have developed some networking applications for the Android mobile platform, keeping in mind the specific requirements of disaster management and the required simplicity of the User Interface. The applications transfer data from an Android device to another Android device or a web server using the client-server model over a Wi-Fi network. The data uses some of the features available in smart phones like GPS location, audio recording and the ability of these devices to connect to Wi-Fi networks. A detailed architecture of the client and server applications and a brief User Guide are described in the report.
We have developed 5 different applications:
Client side Android application (Helpdroid.apk)
2 server side Android web applications (Android_scan.war and Android_transfer.war)
2 server side Desktop web applications (Desktop_scan.war and Desktop_transfer.war)
Installation of Applications
To install Helpdroid.apk, download it directly from the internet or transfer it to the Android device through the data cable or Bluetooth. First enable the installation of non-market Android applications, by going to the Settings -> Applications -> Unknown Sources option. Then install the application directly by going to the location where it was saved, and double click on the Helpdroid.apk icon. Create a folder named "Recordings‟ in the /mnt/sdcard directory of the Android device, where all the Audio recording files will be saved by default.
Before installing the server side Android web applications, first install the i-jetty application. It can be directly downloaded and installed from the Android market or through its apk file. After installation, the home screen of i-jetty comes up, as shown in Fig. Click on the "Download‟ button to go to a screen with 2 text boxes, as shown in Fig. Enter the URL of the Android_scan.war, placed at some location accessible over the network. In the "Context Path‟ field, enter "/WebApplication8‟ and then press the "Download‟ button. The i-jetty application will download and install the war file in a default location in the internal memory of the device. To install Android_transfer.war web application, follow similar steps as in the previous case. In the „Context Path‟ field, enter "/WebApplication2‟.
To start both the web applications, press the "Start Jetty‟ button on the main page of the i-jetty application, as shown in Fig. Create a folder named "Transfers‟ in the /mnt/sdcard directory of the Android device, where the files transferred from other devices will be saved by default. Also, create a "disaster.txt‟ file in the /mnt/sdcard directory, and write the name of the device. This name will be used to lookup the name of the device while sending a file or to identify the device when some other device wants to connect to the active mobile server running on the device.
Before installing the server side desktop web applications, install a Tomcat6 web server on the desktop. To check if it installed properly, enter "http://localhost:8080/’ in a web browser. If you can see the page with heading "It Works‟, it means the setup was successful. From that page, go to the manager webapp, available at "http://localhost:8080/manager/html‟. It will prompt for a username and password, which can be set by the root user in the "/etc/tomcat6/tomcat-users.xml‟ file. From the Tomcat Web Application Manager, download and install both the war files. Create a folder named "Transfers‟ on the Desktop of the computer, where the files transferred from other devices will be saved by default. Also, create a "disaster.txt‟ file on the Desktop, and write the name of the device. This name will be used to identify the server when some other device wants to connect to the active web server running on the computer.
Using the Applications
To use the client side application Helpdroid, first enable the Wi-Fi and GPS sensors of the device. In case Internet is also available on the Wi-Fi network, enable it as well. The main screen of the application will appear. If the GPS sensor is working, it will show the current location of the device in the first field. Since the GPS sensor does not work indoors, the device should be tested outdoors. On clicking the "Map View‟ button, the current location is shown as a marker on Google Maps. It will work only in case of active internet connection as the Google Maps are not available offline.
Before starting the audio recording, the user has to enter the name of the file in the text box. The user does not need to give the extension along with the file name. By default, the files are saved in the .mp4 format. When the user presses the "Start Recording‟ button, a short toast is sent on the screen to intimate the user about the starting of recording. When the user presses the "Stop Recording‟ button, the recording stops, a toast is sent to intimate the user, and the file is saved in the /mnt/sdcard/Recordings folder in the device with the given file name and .mp4 extension. In case a file already exists with the same filename in the directory, it overwrites the previous file.
Before doing anything else, the user should first identify the active servers in the Wi-Fi network using the "Select Server‟ button. All the active servers (mobile and desktop servers) in the Wi-Fi network are listed with their name and IP address. Click on the server to which the user wants to send the file. Then the Server Scanning module is destroyed and it takes the user back to the main page of the application.
Once the IP address of the server has been incorporated in the client, the user can enter any additional information about the file and set the priority of the message in the relevant fields. Then the user can enter the path of the file manually, or find the path using the "Select File‟ button. It puts the absolute path of the file in the text box. When the user presses the "Send File‟ button, the file is sent and another screen comes up with the message "File Sent‟.
If the file is transferred to a mobile server running on an Android device, the device gets a notification alerting him about the file received. All the transferred files are saved in the internal memory of the Android device in the /mnt/sdcard/Transfers directory. For effective organization, the transferred Objects are saved in a folder named by the sender‟s name and the timestamp of receiving the file. The Object folder contains the transferred file and an HTML file. When the user opens the HTML file, it shows the location of the sending device as a marker on a Google Map. It also gives a link to open the file along with the meta-data about the file.
If the file is transferred to a web server running on a desktop, there is no such notification. When the client transfers the object containing the main file and the corresponding HTML file, it saves the folder in the Transfers folder on the Desktop by the sender‟s name and the timestamp of receiving the file. On opening the HTML file, the user can see the location of the sending device on a Google Map, as well as the meta-data of the file on the web page.