Friday, January 20, 2017

My first Android app: Rescue Map

A friend of mine is a member of the search and rescue organization AKUT. He asked if there is an app that could draw the estimated victim region on a map according to victim category.

The category specifies at what speed the victim is expected to be moving. The app has to have offline map capability so that it can be used when there is no reliable internet connection.

I did a quick search on Google Play and could not find anything that did the job. So, I decided to write it myself as a first project in Android. The source code is on GitHub. I don't plan on publishing it to Google Play until my friend says that the app is really useful and others could benefit from it.

User Guide:
  • Installation
    • Make sure you have Android 7 or higher.
    • Make sure you have internet connection.
    • Download RescueMap and install it by enabling apps from unknown sources.
    • Permissions: Go to Settings / App / RescueMap / App permissions
      • Location
      • Wifi access
    • Run RescueMap
  • Usage
    • Concept: Mark victim on map. App updates estimated victim zone circle according to victim category. The rescuer knows the area where he should search for.
    • User marker, marker click, title click, edit lat, lon, date, time
    • Settings: Let's you update movement speeds
    • Map long click, edit lat, lon, date, time, category (sets victim movement speed)
    • Marker click, title click

Developer Guide:
  • GUI described in XML
  • Permissions in manifest
  • Preventing deletion of markers when orientation changes
  • GoogleMaps
  • Thread
    • UpdateCircles
    • Auto-Zoom map for buffering
  • Save/load on Android
  • Button on action bar
  • Solution to "...update play services" error
  • Assign icon

Notes:
  • The speed of person to be rescued depends on geography. Speed will be different when walking on flat terrain and climbing up/down a mountain. It is also affectd by weather conditions. It is the responsibility of the user to take such effects into account when estimating and entering movement speed.
  • Help contents:
    • Introduction: Define rescuer, victim, user, category
    • Long click
      • Auto zooms to buffer map tiles for offline use.
      • Requires internet connection. Otherwise error message is displayed and auto zoom stops.
      • Cannot do another long click while auto zooming.
    • Clicking marker title shows info
      • User
      • Rescuer
      • Victim
    • Settings: Category speeds
    • Victim radius updated every 1 second.
    • About
      • Credits: Tolga
      • version info
      • Copyright Şamil Korkmaz
      • Github release link
      • Github source code link
      • Github issues link
      • Blog link
      • Email
      • Link to pdf
      • AKUT link
  • YouTube: I need phone screen video capture software.
Tested on:
  • General Mobile (Android 7.1.1)
  • Samsung S4 (Android 7.0)
  • Nexus 10 (?)
TODO
Short term:
  • Show location of user as a marker with user name as title. Marker location shall be updated every 10 seconds.
  • Marker and radius color should depend on category
  • Add elevation info to both user and victim info box.
  • Add settings menu:
    • User should be able to add/delete/edit categories and save them. User should be able to restore default values.
    • Help + About (with thanks to my friend)
      • Link to AKUT
      • Link to my blog post
      • Link to GitHub
  • Design icon
  • Marker info should include rescuer/victim photo, gender, age
  • Copy help to this blogpost.
  • Build in release mode and add a new release to GitHub.
Long term:
  • Have two types of users:
    • Admin: Has access to adming console (a separate app). Through this console, he can define a rescue mission. In that mission:
      • Can add/delete/edit locations
      • Add/delete categories and speeds
      • Can see all resuers location
    • User
      • Can join a mission. His location will be send to admin console which broadcasts it to other users.
      • Can only see what the admin has input for that mission (i.e. he cannot change locations, speeds etc.)
    • Use app synchronizes every 10 minutes with admin if there is internet connection
      • Display last time of synchronization
  • Use cloud or your own VPS to synchronize.
  • Publish app to Google Play
  • Show points of interest
    • Police stations (+distance of user to closest station)
    • Hospitals  (+distance of user to closest one
  • Show weather information at location:
    • Wind speed and direction
    • Temperature
    • Cloud ceiling altitude
    • Snow depth
    • Rainfall rate
    • Time of sunset and sunrise
  • Work in background (download maps, rescuers locations, victim locations) even when phone is sleeping but app is active.
  • When connected to the internet
    • Have common chat
    • click on other rescuer marker and start messaging/calling/video chat
  • Port to iOS.

No comments: