From: Kyuho Jo Date: Wed, 8 Jul 2015 13:39:16 +0000 (+0900) Subject: [ACR-80] Documetation updated for active notification. X-Git-Tag: tizen_3.0/TD_SYNC/20161201~721^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=564cbffe2254bbe98c66055ff7fff59007597eef;p=sdk%2Fonline-doc.git [ACR-80] Documetation updated for active notification. Change-Id: I2dcebf273fbe2a62c6451ba468d0986bf9c538d3 Signed-off-by: Kyuho Jo --- diff --git a/org.tizen.guides/html/images/active_notification.png b/org.tizen.guides/html/images/active_notification.png new file mode 100644 index 0000000..a946460 Binary files /dev/null and b/org.tizen.guides/html/images/active_notification.png differ diff --git a/org.tizen.guides/html/native/app/notification_n.htm b/org.tizen.guides/html/native/app/notification_n.htm index 7dcace0..416a5ec 100644 --- a/org.tizen.guides/html/native/app/notification_n.htm +++ b/org.tizen.guides/html/native/app/notification_n.htm @@ -1,103 +1,110 @@ - - - - - - - - - - - - - Notification - - - - - -
- -

Notification

-

An application can create notifications for the user.

-

The Tizen Notification API requires the http://tizen.org/privilege/notification privilege.

- -

To use the notification feature:

-
  • To post a simple notification, use the notification_post() function, which accepts a notification handle as a parameter. -

    The posted notification has a default notification icon and the application name as the title.

  • -
  • To control the detailed behavior of the notification or to show the progress bar in the on-going activity area, use the notification_create() function to get a notification handle and set the details.
- -

Notification Types

-

Tizen provides notifications by using a combination of any of the following notification types:

- -
  • Indicator
  • -
  • Quick panel
  • -
  • Sound
- -

You can specify the message for the indicator or quick panel. The display area for quick panel notifications can be one of the following:

-
  • Notification area -

    The notification area is the reserved space for displaying all notifications, except the on-going notifications.

  • -
  • On-going area -

    The on-going area is the application screen area and is only used to display notifications for the currently running application.

- -

Figure: Notification and on-going areas

-

Notification and on-going areas

- -

Notification Layouts

-

The following notification layouts are provided:

-
  • NOTIFICATION_LY_NOTI_EVENT_SINGLE -

    Layout for a single event notification.

  • -
  • NOTIFICATION_LY_NOTI_EVENT_MULTIPLE -

    Layout for a multiple event notification.

  • -
  • NOTIFICATION_LY_NOTI_THUMBNAIL -

    Layout for a notification displaying images.

  • -
  • NOTIFICATION_LY_ONGOING_EVENT -

    Layout for an ongoing notification displaying a text message.

  • -
  • NOTIFICATION_LY_ONGOING_PROGRESS -

    Layout for an ongoing notification displaying progress.

- -

Figure: Notification layouts

-

Notification layouts

- - - - -
- -Go to top - - - - - - + + + + + + + + + + + + + Notification + + + + + +
+ +

Notification

+

An application can create notifications for the user.

+

The Tizen Notification API requires the http://tizen.org/privilege/notification privilege.

+ +

To use the notification feature:

+
  • To post a simple notification, use the notification_post() function, which accepts a notification handle as a parameter. +

    The posted notification has a default notification icon and the application name as the title.

  • +
  • To control the detailed behavior of the notification or to show the progress bar in the on-going activity area, use the notification_create() function to get a notification handle and set the details.
+ +

Notification Types

+

Tizen provides notifications by using a combination of any of the following notification types:

+ +
    +
  • Quick panel
  • +
  • Active notification
  • +
  • Indicator
  • +
+ +

You can specify the message for the indicator or quick panel, active notification.

+

Notifications on quick panel

+

The display area for quick panel notifications can be one of the following:

+
  • Notification area +

    The notification area is the reserved space for displaying all notifications, except the on-going notifications.

  • +
  • On-going area +

    The on-going area is the application screen area and is only used to display notifications for the currently running application.

+ +

Figure: Notification and on-going areas

+

Notification and on-going areas

+ +

Active Notification

+

Active notification can be used to show a notification on upper side of screen.

+

You can add several buttons for getting user interaction.

+ +

Figure: Active notification

+

Active notification

+ +

Notification Layouts

+

5 types of layouts are provided. The notifications layout can be one of the following:

+
  • NOTIFICATION_LY_NOTI_EVENT_SINGLE +

    Layout for notification. Used to inform single event.

  • +
  • NOTIFICATION_LY_NOTI_EVENT_MULTIPLE +

    Layout for notification. Used to inform multiple event.

  • +
  • NOTIFICATION_LY_NOTI_THUMBNAIL +

    Layout for notification. Used to display images.

  • +
  • NOTIFICATION_LY_ONGOING_EVENT +

    Layout for ongoing notification. Used to display text message.

  • +
  • NOTIFICATION_LY_ONGOING_PROGRESS +

    Layout for ongoing notification. Used to display progress.

+ +

Figure: Notification layouts

+

Notification layouts

+ + + + +
+ +Go to top + + + + + + \ No newline at end of file diff --git a/org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm b/org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm index b1cf813..7db32b4 100644 --- a/org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/app_framework/notification_tutorial_n.htm @@ -262,6 +262,7 @@ if (ret != NOTIFICATION_ERROR_NONE)
  • NOTIFICATION_DISPLAY_APP_TICKER
  • NOTIFICATION_DISPLAY_APP_LOCK
  • NOTIFICATION_DISPLAY_APP_INDICATOR
  • +
  • NOTIFICATION_DISPLAY_APP_ACTIVE
  • NOTIFICATION_DISPLAY_APP_ALL
  • @@ -336,6 +337,64 @@ if (ret != NOTIFICATION_ERROR_NONE)    // Error handling } +

    Adding a button on Active Notification

    +

    To add a button on Active Notification, use the notification_add_button() function and notification_set_event_handler() function:

    +
    notification_add_button(notification_h noti, notification_button_index_e button_index)
    + +

    This function takes the following parameters:

    + + +

    The possible values for the button_index parameter are:

    + + +
    notification_set_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h event_handler)
    + +

    This function takes the following parameters:

    + + +

    The possible values for the event_type parameter are:

    + + +
    +
    +noti_errnotification_add_button(noti, NOTIFICATION_BUTTON_1);
    +if (noti_err != NOTIFICATION_ERROR_NONE) {
    +   // Error handling
    +}
    +
    +app_control_h app_control = NULL;
    +
    +app_control_create(&app_control);
    +app_control_set_app_id(app_control, "org.tizen.app");
    +noti_err  = notification_set_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control);
    +if (noti_err != NOTIFICATION_ERROR_NONE) {
    +   // Error handling
    +}
    +
    +app_control_destroy(app_control);
    +}
    +

    Posting a Notification

    To post a notification to the database, use the notification_post() function: