Skip to content

A personal toolkit for recording evidence during emergencies.

Notifications You must be signed in to change notification settings

instantiator/emergency-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Emergency Recorder Toolkit

A personal toolkit for recording evidence during emergencies using a modern Android phone.

Follow PoliceRewired

What does the toolkit do?

The Emergency Recorder Toolkit is aimed at people encountering emergencies, who are on the phone to emergency services. Without any additional effort on their part, it detects the emergency call and initiates video recording.

When capture begins, the app offers 3 modes:

  • Photography (allow the user to point and click to take photos). No audio.
  • Burst mode (takes a series of photos, and stitches them together afterwards into a video). Audio recorded separately.
  • Full video. Audio recorded with video.

Can you really do that?

We have working code, and the app in its current state illustrates solutions to the following challenges:

  • Create a camera preview, constrained to be small enough not to obstruct an emergency call.
  • Create an overlay ('bubble') containing the camera, drawn over the top of any other app.
  • Make the overlay draggable, without obstructing taps for the apps behind.
  • Detect calls made through the standard Android dialler.
  • Examine the number used for the outgoing call, and make a decision based on its content.
  • Take photos from the overlay.
  • Take a series ('burst') of photos from the overlay, and stitch them into a video afterwards.
  • Record audio from the overlay, whilst the photos are being taken.
  • Insert photos, videos, and audio into appropriate places in the Android media gallery.
  • Retrieve the user's current location whilst they have the bubble open.
  • Geocode that location to display a nearby street address for the user.
  • Parse that location into What3Words to display a short 3-word location to the user.

Does this violate privacy?

"In the United Kingdom there are no laws forbidding photography of private property from a public place."

The app itself simply records to your phone. It is designed to make it possible to improve the quality of evidence you can give to police. You choose what is shared, how, and to whom.

How far is the project developed?

Persistence

  • Requests appropriate permissions.
  • Displays a persistent notification to assure the user that the service will respond to outgoing calls.
  • App is resilient against shutdowns initiated by the OS (for whatever reason).
  • App launches automatically when the device starts up.
  • Displays an unobtrusive floating button which the user can use to open the camera bubble.

Bubble camera

  • App can launch the camera preview in an overlay ("camera bubble").
  • User can take photos using the overlay.
  • The new photo appears in the user's phone gallery immediately.
  • User can take a burst of photos using the overlay.
  • During the burst, each photo taken is added to the phone gallery immediately.
  • After a burst, photos are stitched into a video, and appear in the user's phone gallery.
  • App displays a notification whilst photographs are being stitched into video.
  • Audio recording accompanies the burst mode photography.
  • The new audio appears in an album called 'Emergency Audio' in the user's music app immediately.
  • A record of each recording made is stored in the app's internal database.
  • User can take a standard video using the overlay. (See dependencies, below.)
  • The new video appears in the user's phone gallery immediately.

Receive outgoing calls

  • App registers with Android to receive information about outgoing calls.
  • Outgoing calls that initiate an action in the app are recorded in the app's internal database.
  • The user's rules are applied to each outgoing call to determine the action to take.

Behaviours

  • User can specify which telephone numbers will trigger the camera overlay.
  • User can specify a behaviour (launch camera | start video | start burst | nothing) per number.
  • Rules (telephone number -> behaviour) are stored in the app's internal database.

Location

  • App fetches the user's current location.
  • App geocodes that location, and displays the closest address to the user.
  • App also utilises the What3Words API to make visible the closest What3Words location.
  • App superimposes coordinates and time onto visible portion of each stored photo.
  • App stores taken time and location information in metadata for each stored photo.

User information

  • Users can view a log showing a record of each recording made by the app.
  • Users can view an About page detailing information about the app, and find out more about Police Rewired.
  • App features a HOWTO video, showing how it works and how it can be helpful.
  • App links to a website with info about how to be helpful and safe. (eg. What makes a good witness? What makes good evidence?)

Dependencies

  • CameraKit is superb, but the version 1.0.0 beta series does not yet support video recording. This is coming soon.
  • CameraView replaces CameraKit in v0.5 onwards of the app.
  • Keeping services and intent listeners alive on Android is non-trivial, particularly as some manufacturers' versions of Android seem to have different rules about when to halt long-running processes. We are using background-service-lib, an open source background service toolkit library from Front-Line Tech Ltd.
  • We use Google Play Services to provide location facilities, and Android provides geocoding facilities.
  • We also use What3Words to provide a short, easily pronounceable location description.
  • We use jcodec to stitch photos into video.

What is Police Rewired?

Police Rewired is a group of volunteer developers, designers, academics, data scientists and creative problem solvers who want to make everybody a bit safer by building new tools. We fight crime with code.

All our projects are open source. You can find out more at our website: https://policerewired.org

About

A personal toolkit for recording evidence during emergencies.

Resources

Stars

Watchers

Forks

Packages

No packages published