Languages

Menu
Sites
Language
How to group notifications from the same app into a single notification???

Tizen documentation says that exits a layout for a multiple event notification (https://developer.tizen.org/ko/development/guides/native-application/notifications-and-content-sharing/notifications?langredirect=1) but I could not find any example using NOTIFICATION_LY_NOTI_EVENT_MULTIPLE and was not able to gather multiple notification into a single one. 

Edited by: Taylor Fletcher on 27 Mar, 2018

Responses

4 Replies
Armaan-Ul- Islam

The function should Look like this:

 

notification_set_layout (notification_handle, NOTIFICATION_LY_NOTI_EVENT_MULTIPLE ) 	

 

You may check out the Notification API References for details...

 

https://developer.tizen.org/development/api-references/native-application?redirect=/dev-guide/4.0.0/org.tizen.native.mobile.apireference/group__NOTIFICATION__MODULE.html

Taylor Fletcher

I've tried that, but it keeps posting new notification not gathering them.

Here is my code:

 

static notification_h notification = NULL;

void create_notification(char* text)
{
    notification = notification_create(NOTIFICATION_TYPE_NOTI);

    int ret =0;

    ret = notification_set_layout(notification, NOTIFICATION_LY_NOTI_EVENT_MULTIPLE);

    ret = notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, text, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);

    ret = notification_set_display_applist(notification, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_LOCK);

    app_control_h app_control = NULL;
    ret = app_control_create(&app_control);
    ret = app_control_set_app_id(app_control, "org.example.notification");
    ret = notification_set_launch_option(notification, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL,app_control);

    ret = notification_post(notification);

}

Then I call create_notification(text) two times in my app, but instead of grouping the two notification it creates two separeted ones.

Armaan-Ul- Islam

After checking your response, I've also tried grouping the notifications. But the result is same as yours...

 

Could be a bug...You may report a bug on Tizen bug Tracker. Here's a guideline on how to report bugs. Please share the 'Reported bug' link here on this post to help the developers keep track.

 

In Addition: You may check out the sample tutorial app, That might help. New > Sample > Mobile > Native > APPfw > (Tutorial) Notification

Armaan-Ul- Islam

I've reported a bug on Tizen Bug tracker. Please can check this link to keep track...

 

Title: Notification Grouping do not function

Link: https://bugs.tizen.org/browse/PTAPI-67