Add a Wayland protocol for handling Emergency Alerts
Emergency Alerts are an alert type in various types of media, such as Operating Systems on phones, and televisions, in order to let you know of... emergencies... so you're prepared for them in advance.
What is an Emergency Alert in this context?
While they have various forms across media, for the sake of this issue, an Emergency Alert is a dialog that temporarily obscures the current screen to alert you of the current emergency in progress, alongside playing the country's respective warning chime. On Android, it looks like this:
Why add an Emergency Alert protocol?
Emergency Alerts can be crucial for survival in most cases - they can literally be the difference between life and death in the worst case scenario.
Additionally, with the advent of Linux-based phones in the horizon, it might even be a requirement by law, at least for phones, to add Emergency Alerts, so if it's gonna inevitably happen, it might as well be standardised.
Furthermore, users in some countries seriously need emergency alerts, such as Japan with them being on the Pacific Ring of Fire, with all the emergencies that that leads to.
Implementation ideas
While I'm currently not sure about how this would be implemented, I do have some ideas for implementation details to consider if this protocol is ever created:
Severities
Different emergencies have different severities, ultimately. Therefore, to allow colour conveyance for emergency types, I'd also suggest adding severities to the mix:
- Report: Yellow, for non-danger-to-your-life emergencies such as Child Abduction Emergencies, etc.
- Warning: Red, for all types of emergencies that serve a danger to your life, such as Earthquakes, Tsunamis, Tornadoes, etc.
Design
For phones, if not Desktops too, a sound should play while all other sound channels are temporarily muted or paused, and a dialog should show that, while also causing the screen to wake up if currently off:
- on Desktop allows for dismissing the alert, locking the device, hibernating the device or shutting down the device
- on Phone obscures input to the application or home screen behind it until dismissed
Additionally, the dialog that's shown will probably your basic DE-themed dialog with a header and text, due to limitations, though if emergency receivers ever get the ability to get the 'type' of an emergency (earthquake, etc.), an accompanying illustration of safety instructions would also be a good addition to those dialogs, in a similar vain to how recent versions of Android now feature a unique earthquake emergency screen complete with safety instructions.
Finally, these dialogs should have a way of conveying they're for emergencies, even if it's something basic like how Android shows a red flashing warning icon, or, say for GNOME it could be the border around the dialog emanating yellow or red from it.
Targets for this protocol
Obviously, the main target for this protocol would be phones, since they are the main receiver of emergency alerts. However, it would also be a reasonable idea for Desktop Environments, and maybe even smartwatch environments and VR environments, to also be targeted by this protocol. After all, on Desktop for instance there's plenty of emergency alert software out there that could make use of such a protocol, such as JQuake, and on smartwatches it could obtain the emergency alert details from a paired phone.
This protocol would also therefore be an optional one due to not fitting in every context Wayland encompasses.
Application Permissions
Finally, to prevent abuse of this protocol, I envision that this protocol will be a permission that users will need to initially grant applications that request it, being a request along the lines of '... would like to show emergency alerts on this device'. Additionally, the OS could then predetermine some applications already getting that permission in the event an application for broadcasting emergency alerts is pre-installed like how there always is one on iOS and Android.