Add support for notification title. The notification buffer must contain the title and the message separated by a '\0' character.
If the buffer does not contain any \0, the whole buffer is considered to be the message of the notification. A default title will be displayed in the notification app.
This commit is contained in:
parent
58a2d000c4
commit
03de1c6739
7 changed files with 30 additions and 9 deletions
|
|
@ -75,6 +75,7 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
|
|||
os_mbuf_copydata(ctxt->om, headerSize, messageSize-1, notif.message.data());
|
||||
os_mbuf_copydata(ctxt->om, 0, 1, &category);
|
||||
notif.message[messageSize-1] = '\0';
|
||||
notif.size = messageSize;
|
||||
|
||||
// TODO convert all ANS categories to NotificationController categories
|
||||
switch(category) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue