Share Emergency Contacts Beta
I have been working on an app for a while called “Share emergency contacts”.
Today I am releasing the initial beta (Android only, manual APK download). You can download it from this page.
The app allows you to define your own profiles (containing any details such as blood group, allergies, name, address, phone number, emergency contacts, insurance details, ..) and to share it via a QR code with other users of the app.
All the data to be entered is optional, so you can decide what to share.
Other users of the app can then scan the QR code from your phone and instantly receive your details.
By scanning the QR code no data is transfered over the internet (all data is inside the QR code), the app will thus even work when you are not connected to the internet.
A lot of high-risk activities are usually done in groups (motorcycling, climbing, mountaineering, etc.).
However in case of an emergency you might realize that you don’t know too much about the other person even if it’s your best friend.
Do you know:
- his blood group
- insurance details
- Possible allergies/medical issues
- phone number of his parent?
In case of an accident such information could be vital. Especially if the other person is unconscious (fell while climbing, heavy motorcycle accident, ..).
Normal contact lists don’t allow linking contacts (e.g. “contact A” is mother of “contact B”).
If you started adding all the emergency contacts for everyone you know, the contact list would become quite big and you still wouldn’t know who’s the emergency contact for whom.
This app allows to define a contact with multiple emergency contacts attached to it. Additionally it also allows attaching multiple insurance details (of course all data to be entered is optional - you decide what you want to share).
Here’s what it looks like so far:
So far the app supports:
- creating multiple profiles (e.g. different insurance details for different activities: motorcycling/climbing/etc.)
- receive profiles from other users
- Define name, birthday, address, multiple phone numbers, email, blood group, weight, height, note as well as multiple emergency contacts and multiple insurance contacts
- Each emergency contact may contain name, email, multiple phone numbers, notes, address, birthday
- Each insurance contact may contain the same as emergency contacts + insurance number
Any profile (received contact or own profile) can be shared via the QR code.
- Additonal fields:
- Relationship (of emergency contcts)
- Allow import/export for phone contacts
- Allow import/export as csv
- Light/dark theme
- Share details for a limited time
The last feature can be useful if you go on an organized trip with a group of people you might not see again after the trip.
By sharing your details for a predefined number of days (e.g. duration of the trip) you ensure that your details are removed from their phone after the trip.
Thus their list of contacts is not cluttered with your details anymore and you can be sure that your details are removed from their phone after the trip.
Just a few thoughts on what I have done so far.
Sharing works via QR code and QR codes need to have as little text as possible (the more, the bigger it gets).
As a format I thus used the VCARD format. It has the advantage of being both compact and widely recognized.
Since the VCARD format is rather limited (as it is intended for a single contact only) I had to write some extensions for it.
Luckily it is accepted behaviour to use “X-” for “private extensions”. Any program that doesn’t recognize any of the “X-” fields should simply ignore them.
Thus I define e.g. “X-ICE-%id%-%actual%” extensions which allow me to store an entire additonal contact (ICE = In Case of Emergency) in the same VCARD.
%id% being an int that is used to differentiate the X-ICE fields between multiple emergency contacts.
%actual% being a regular field (e.g. “FN” for the formatted name).
I can store multiple emergency contacts in a single contact like so:
BEGIN:VCARD VERSION:4.0 FN:Marc Stan X-ICE-1-FN:Mom X-ICE-2-FN:Dad END:VCARD
After stripping the “X-ICE-” I filter the remaining line by integer value so that all of the same int are grouped together (same ICE contact) and then I process the remainder of the line (“FN:Mom”) as a regular VCARD line for a new (sub)contact.
The app is written using Xamarin.Forms and so far runs just fine on UWP (tested on desktop and phone), Android (tested on phone only) and iOS (tested in emulator only).
There are a few pain points such as:
- Android app cold startup time being 6-7s (on a high end device) whereas even on the slowest Windows 10 Mobile phone it is < 3s
- Slightly inconsistent behaviour across platforms (esp. when it comes to default values for e.g. margins)
- Icon madness (any single icon must be regenerated in at least a dozen different sizes to satisfy iOS/Android/UWP icon size requirements)
However since this was my first app written in Xamarin.Forms it was also a learning experience for me. since Xamarin is rapidly evolving and thus a lot of documentation is outdated or new bugs arise.
Thankfully the community is really helpful and for any problem there is almost always already a plugin that solves it across all platforms (XLabs with dozens of additional controls, ZXing Mobile barcode library, etc.).
While continuing development of the app I’ll refactor it and perhaps extract a few of the cross platform features I had to build myself into nuget packages so that everyone can benefit from them.