Hi all, trying to work on the Cell-Broadcast feature.
I'm writing here just as a shared note...
First step could be to implement only Emergency Alerts.
That would need a persistent Notification if possible with a specific sound ( see https://forums.ubports.com/topic/7794/cell-broadcast-story-ui/8), a notification in the messaging indicator and a way to read it later.
We should also have a toggle in settings to enable/disable the feature.
I know some country are even making the option mandatory.
Question here: Should that option be in notification category or in cellular related things ?
As that behaviour is almost like a classic sms, i'm planning to use the current Telepathy Framework by just doing some tweaks ( define a constant sender, MessageType of ChannelTextMessageTypeNotice ).
Define a fake Contact that have the "warning" as the avatar so that it can be recognized in the messaging-app and popups/notifications.
We are lucky to have already the phone part, Ofono expose a Dbus interface for CellBroadcast ( not tested yet )
The work will involve work in telepathy-ofono, telephony-service, history-service (not sure)) , system-settings, gsettings-ubuntu-touch-schemas for the alert sound ).
telepathy-ofono: Takes inputs from ofono cellbroadcast signals ( https://github.com/ubports/ofono/blob/xenial/doc/cell-broadcast-api.txt ). Currently there are notifications for the ETWS system (EmergencyBroadcast signal) and another for all other channels (IncomingBroadcast).
My idea here is to merge the 2 signals and send toward Telepathy a TextMessage with the sender identified as "x-ofono-cellbroadcast", the Subject as the channel topic, type of message of ChannelTextMessageTypeNotice, and the body of the alert in text property.
telephony-service: Listen to Telepathy incoming TextMessage, when message == ChannelTextMessageTypeNotice, sender is "x-cellbroadcast-alert" , and according to Subject, we should display a notification with the corresponding sound.
Different levels of warning are here dependent of the Subject.
The alert is also displayed in the message indicator, and a way to open messaging app to see it again.
history-service: Listen to Telepathy incoming TextMessage ans stores the alert as a message ( message could be of type MessageTypeInformation)
messaging-app: The alerts are gathered into a Thread, the notification icon could be the "broadcast icon", and messages can be styled differently according to their Subject ( channel ).
system-settings: Subscribe to channels, toggles to the different type of broadcast
e.g on Android:
Issue reference: The issue: https://github.com/ubports/ubuntu-touch/issues/141
Spec IETSI: https://www.etsi.org/deliver/etsi_ts/102900_102999/102900/01.03.01_60/ts_102900v010301p.pdf
Spec 3GPP: https://www.3gpp.org/ftp/Specs/archive/23_series/23.041/ ( last one - see 9.4.1.2.2 Message Identifier for the channel list)
android constants: https://github.com/aosp-mirror/platform_frameworks_base/blob/c5d02da0f6553a00da6b0d833b67d3bbe87341e0/telephony/java/com/android/internal/telephony/gsm/SmsCbConstants.java
Help needed for the UX part:
https://forums.ubports.com/topic/7794/cell-broadcast-story-ui/8
Currenlty Xenial telepathy-ofono uses a libofono-qt version which does not include the Cellbroadcast API => See with Team
The test procedure is written here ( see "Test" section) : https://github.com/ubports/ubuntu-touch/issues/2003