Tizen Native API  5.5

Notification APIs.

Required Header

#include <notification.h>

Overview

A notification is a message that is displayed on the notification area or the ongoing area. It is created to notify information to the user through the application. This API provides functions for creating, inserting and updating notification.

Functions

int notification_set_image (notification_h noti, notification_image_type_e type, const char *image_path)
 Sets an absolute path for an image file to display on the notification view.
int notification_get_image (notification_h noti, notification_image_type_e type, char **image_path)
 Gets the absolute path of an image file.
int notification_set_time (notification_h noti, time_t input_time)
 Sets a timestamp.
int notification_get_time (notification_h noti, time_t *ret_time)
 Gets a timestamp.
int notification_get_insert_time (notification_h noti, time_t *ret_time)
 Gets an insertion timestamp of the notification.
int notification_set_text (notification_h noti, notification_text_type_e type, const char *text, const char *key, int args_type,...)
 Sets the text to display on the notification view.
int notification_get_text (notification_h noti, notification_text_type_e type, char **text)
 Gets the text from the notification handle.
int notification_set_time_to_text (notification_h noti, notification_text_type_e type, time_t time)
 Sets the timestamp to display on the notification view.
int notification_get_time_from_text (notification_h noti, notification_text_type_e type, time_t *time)
 Gets the timestamp from the notification handle.
int notification_set_sound (notification_h noti, notification_sound_type_e type, const char *path)
 Sets the sound type for the notification.
int notification_get_sound (notification_h noti, notification_sound_type_e *type, const char **path)
 Gets the sound type from the notification handle.
int notification_set_vibration (notification_h noti, notification_vibration_type_e type, const char *path)
 Sets the vibration type for the notification.
int notification_get_vibration (notification_h noti, notification_vibration_type_e *type, const char **path)
 Gets the vibrate type from the notification handle.
int notification_set_led (notification_h noti, notification_led_op_e operation, int led_argb)
 Sets the LED displaying option.
int notification_get_led (notification_h noti, notification_led_op_e *operation, int *led_argb)
 Gets the LED displaying option from the notification handle.
int notification_set_led_time_period (notification_h noti, int on_ms, int off_ms)
 Sets the time period of flashing the LED.
int notification_get_led_time_period (notification_h noti, int *on_ms, int *off_ms)
 Gets the time period of flashing the LED from the notification handle.
int notification_set_launch_option (notification_h noti, notification_launch_option_type type, void *option)
 Sets the launch option for a notification.
int notification_get_launch_option (notification_h noti, notification_launch_option_type type, void *option)
 Gets the launch option from the notification handle.
int notification_set_event_handler (notification_h noti, notification_event_type_e event_type, app_control_h event_handler)
 Sets the handler for a specific event.
int notification_get_event_handler (notification_h noti, notification_event_type_e event_type, app_control_h *event_handler)
 Gets the event handler of a specific event.
int notification_set_property (notification_h noti, int flags)
 Sets the property of the notification.
int notification_get_property (notification_h noti, int *flags)
 Gets the property of the notification from the notification handle.
int notification_set_display_applist (notification_h noti, int applist)
 Sets applications to display the notification.
int notification_get_display_applist (notification_h noti, int *applist)
 Gets the application list displaying the notification from the notification handle.
int notification_set_size (notification_h noti, double size)
 Sets the initial size for the ongoing type.
int notification_get_size (notification_h noti, double *size)
 Gets the progress size.
int notification_set_progress (notification_h noti, double percentage)
 Sets the initial progress for the ongoing type.
int notification_get_progress (notification_h noti, double *percentage)
 Gets the progress from the notification handle.
int notification_set_layout (notification_h noti, notification_ly_type_e layout)
 Sets the layout of the notification view.
int notification_get_layout (notification_h noti, notification_ly_type_e *layout)
 Gets the layout of the notification view from the notification handle.
int notification_get_type (notification_h noti, notification_type_e *type)
 Gets the type of a notification.
int notification_update (notification_h noti)
 Updates notification data.
int notification_delete (notification_h noti)
 Deletes a notification with the given handle.
notification_h notification_create (notification_type_e type)
 Creates internal structure data and returns a notification handle.
int notification_clone (notification_h noti, notification_h *clone)
 Creates a notification clone.
int notification_free (notification_h noti)
 Frees the internal structure data of a notification handle.
int notification_set_tag (notification_h noti, const char *tag)
 Sets the tag of the notification handle.
int notification_get_tag (notification_h noti, const char **tag)
 Gets the tag of the notification handle.
notification_h notification_load_by_tag (const char *tag)
 Loads a notification from the notification's database with the tag.
int notification_delete_all (notification_type_e type)
 Deletes all notifications of the given type.
int notification_post (notification_h noti)
 Posts a notification.
int notification_get_pkgname (notification_h noti, char **pkgname)
 Gets the package name of the notification.
int notification_add_button (notification_h noti, notification_button_index_e button_index)
 Adds a button on the notification.
int notification_remove_button (notification_h noti, notification_button_index_e button_index)
 Removes a button on the notification.
int notification_set_auto_remove (notification_h noti, bool auto_remove)
 Sets the 'auto remove' option of the active notification.
int notification_get_auto_remove (notification_h noti, bool *auto_remove)
 Gets the 'auto remove' option of the active notification.
int notification_save_as_template (notification_h noti, const char *template_name)
 Saves a notification template to the notification database.
notification_h notification_create_from_template (const char *template_name)
 Loads a notification template from the notification database.
int notification_get_noti_block_state (notification_block_state_e *state)
 Gets notification block state.
int notification_set_text_input (notification_h noti, int text_input_max_length)
 Sets a text input box to reply directly on the notification.
int notification_set_extension_image_size (notification_h noti, int height)
 Sets the image height for the extended notification.
int notification_get_extension_image_size (notification_h noti, int *height)
 Gets the image height for the extended notification.

Typedefs

typedef enum _notification_error notification_error_e
 Enumeration for notification errors.
typedef enum _notification_ly_type notification_ly_type_e
 Enumeration for notification layout type.
typedef enum
_notification_launch_option_type 
notification_launch_option_type
 Enumeration for notification launch option type.
typedef enum
_notification_event_type 
notification_event_type_e
 Enumeration for event type on notification.
typedef enum
_notification_sound_type 
notification_sound_type_e
 Enumeration for notification sound type.
typedef enum
_notification_vibration_type 
notification_vibration_type_e
 Enumeration for notification vibration type.
typedef enum _notification_led_op notification_led_op_e
 Enumeration for notification LED operation.
typedef enum
_notification_count_display_type 
notification_count_display_type_e
 Enumeration for setting display type of count.
typedef enum
_notification_button_index 
notification_button_index_e
 Enumeration for button.
typedef enum
_notification_text_type 
notification_text_type_e
 Enumeration for notification text type.
typedef enum
_notification_image_type 
notification_image_type_e
 Enumeration for image type.
typedef enum
_notification_execute_type 
notification_execute_type_e
 Enumeration for application execution type.
typedef enum _notification_type notification_type_e
 Enumeration for notification type.
typedef enum _notification_op_type notification_op_type_e
 Enumeration for notification operation code.
typedef enum
_notification_op_data_type 
notification_op_data_type_e
 Enumeration for notification operation data code.
typedef enum
_notifcation_count_pos_type 
notification_count_pos_type_e
 Enumeration for notification count position in the text.
typedef enum
_notification_variable_type 
notification_variable_type_e
 Enumeration for notification variable parameter type.
typedef struct _notification * notification_h
 Notification handle.
typedef struct _notification_op notification_op
 The structure for notification operation.
typedef enum
notification_permission_type 
notification_permission_type_e
 Enumeration for permission.
typedef enum
notification_block_state 
notification_block_state_e
 Enumeration for notification block state.

Defines

#define NOTIFICATION_DO_NOT_SHOW_TIME_STAMP   -1

Define Documentation

Do not show time stamp on the notification. Could be passed as a argument of notification_set_time()


Typedef Documentation

Enumeration for notification block state.

Since :
3.0

Enumeration for button.

Since :
3.0

Enumeration for setting display type of count.

Deprecated:
Deprecated since 2.3.1
Since :
2.3

Enumeration for notification count position in the text.

Since :
2.3.1

Enumeration for notification errors.

Since :
2.3.1

Enumeration for event type on notification.

Since :
3.0

Enumeration for application execution type.

Since :
2.3.1
typedef struct _notification* notification_h

Notification handle.

Since :
2.3.1

Enumeration for image type.

Since :
2.3.1

Enumeration for notification launch option type.

Since :
2.3.1

Enumeration for notification LED operation.

Since :
2.3.1

Enumeration for notification layout type.

Since :
2.3.1

The structure for notification operation.

Since :
2.3.1

Enumeration for notification operation data code.

Since :
2.3.1

Enumeration for notification operation code.

Since :
2.3.1

Enumeration for permission.

Since :
3.0

Enumeration for notification sound type.

Since :
2.3.1

Enumeration for notification text type.

Since :
2.3.1

Enumeration for notification type.

Since :
2.3.1

Enumeration for notification variable parameter type.

Since :
2.3.1

Enumeration for notification vibration type.

Since :
2.3.1

Enumeration Type Documentation

Enumeration for notification count position in the text.

Since :
2.3.1
Enumerator:
NOTIFICATION_COUNT_POS_NONE 

Count data is not displaying in the text

NOTIFICATION_COUNT_POS_LEFT 

Count data is displaying at the left of the text

NOTIFICATION_COUNT_POS_IN 

Count data is displaying in the text

NOTIFICATION_COUNT_POS_RIGHT 

Count data is displaying at the right of the text

Enumeration for button.

Since :
3.0
Enumerator:
NOTIFICATION_BUTTON_1 

button 1

NOTIFICATION_BUTTON_2 

button 2

NOTIFICATION_BUTTON_3 

button 3

NOTIFICATION_BUTTON_4 

button 4

NOTIFICATION_BUTTON_5 

button 5

NOTIFICATION_BUTTON_6 

button 6

NOTIFICATION_BUTTON_7 

button 7 (Since 5.0)

NOTIFICATION_BUTTON_8 

button 8 (Since 5.0)

NOTIFICATION_BUTTON_9 

button 9 (Since 5.0)

NOTIFICATION_BUTTON_10 

button 10 (Since 5.0)

Enumeration for setting display type of count.

Deprecated:
Deprecated since 2.3.1
Since :
2.3
Enumerator:
NOTIFICATION_COUNT_DISPLAY_TYPE_NONE 

None

NOTIFICATION_COUNT_DISPLAY_TYPE_LEFT 

The number is placed to left

NOTIFICATION_COUNT_DISPLAY_TYPE_IN 

The number is placed to center

NOTIFICATION_COUNT_DISPLAY_TYPE_RIGHT 

The number is placed to right

Enumeration for display application list.

Since :
2.3.1
Enumerator:
NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY 

Notification Tray(Quickpanel)

NOTIFICATION_DISPLAY_APP_TICKER 

Ticker notification

NOTIFICATION_DISPLAY_APP_LOCK 

Lock screen

NOTIFICATION_DISPLAY_APP_INDICATOR 

Indicator

NOTIFICATION_DISPLAY_APP_ACTIVE 

Active notification

NOTIFICATION_DISPLAY_APP_ALL 

All display application except active notification

Enumeration for notification errors.

Since :
2.3.1
Enumerator:
NOTIFICATION_ERROR_NONE 

Success

NOTIFICATION_ERROR_INVALID_PARAMETER 

Invalid parameter

NOTIFICATION_ERROR_OUT_OF_MEMORY 

Out of memory

NOTIFICATION_ERROR_IO_ERROR 

I/O error

NOTIFICATION_ERROR_PERMISSION_DENIED 

Permission denied

NOTIFICATION_ERROR_INVALID_OPERATION 

Function not implemented (Since: 3.0)

NOTIFICATION_ERROR_FROM_DB 

Error from DB query

NOTIFICATION_ERROR_ALREADY_EXIST_ID 

Already exist private ID

NOTIFICATION_ERROR_FROM_DBUS 

Error from DBus

NOTIFICATION_ERROR_NOT_EXIST_ID 

Not exist private ID

NOTIFICATION_ERROR_SERVICE_NOT_READY 

No response from notification service

NOTIFICATION_ERROR_MAX_EXCEEDED 

Max notification count exceeded (Since: 3.0)

Enumeration for event type on notification.

Since :
3.0
Enumerator:
NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1 

Event type : Click on button 1

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_2 

Event type : Click on button 2

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_3 

Event type : Click on button 3

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_4 

Event type : Click on button 4

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_5 

Event type : Click on button 5

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_6 

Event type : Click on button 6

NOTIFICATION_EVENT_TYPE_CLICK_ON_ICON 

Event type : Click on icon

NOTIFICATION_EVENT_TYPE_CLICK_ON_THUMBNAIL 

Event type : Click on thumbnail

NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON 

Event type : Click on text_input button(Since 3.0)

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_7 

Event type : Click on button 7 (Since 5.0)

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_8 

Event type : Click on button 8 (Since 5.0)

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_9 

Event type : Click on button 9 (Since 5.0)

NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_10 

Event type : Click on button 10 (Since 5.0)

Enumeration for application execution type.

Since :
2.3.1
Enumerator:
NOTIFICATION_EXECUTE_TYPE_NONE 

No operation

NOTIFICATION_EXECUTE_TYPE_RESPONDING 

Responding action

NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH 

Launching when notification data is single

NOTIFICATION_EXECUTE_TYPE_MULTI_LAUNCH 

Launching when notification data is grouping(multi)

Enumeration for Group ID.

Since :
2.3.1
Enumerator:
NOTIFICATION_GROUP_ID_NONE 

Not Grouping

NOTIFICATION_GROUP_ID_DEFAULT 

Notification that has same title is grouping

Enumeration for image type.

Since :
2.3.1
Enumerator:
NOTIFICATION_IMAGE_TYPE_NONE 

None

NOTIFICATION_IMAGE_TYPE_ICON 

Icon

NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR 

Indicator icon

NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK 

Lock screen icon

NOTIFICATION_IMAGE_TYPE_THUMBNAIL 

Thumbnail

NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK 

Lock screen thumbnail

NOTIFICATION_IMAGE_TYPE_ICON_SUB 

Sub icon

NOTIFICATION_IMAGE_TYPE_BACKGROUND 

image displayed on background

NOTIFICATION_IMAGE_TYPE_LIST_1 

Image for thumbnail list

NOTIFICATION_IMAGE_TYPE_LIST_2 

Image for thumbnail list

NOTIFICATION_IMAGE_TYPE_LIST_3 

Image for thumbnail list

NOTIFICATION_IMAGE_TYPE_LIST_4 

Image for thumbnail list

NOTIFICATION_IMAGE_TYPE_LIST_5 

Image for thumbnail list

NOTIFICATION_IMAGE_TYPE_BUTTON_1 

Image for button 1

NOTIFICATION_IMAGE_TYPE_BUTTON_2 

Image for button 2

NOTIFICATION_IMAGE_TYPE_BUTTON_3 

Image for button 3

NOTIFICATION_IMAGE_TYPE_BUTTON_4 

Image for button 4

NOTIFICATION_IMAGE_TYPE_BUTTON_5 

Image for button 5

NOTIFICATION_IMAGE_TYPE_BUTTON_6 

Image for button 6

NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON 

Image for message reply(Since 3.0)

NOTIFICATION_IMAGE_TYPE_EXTENSION 

Image for extended notification (Since 4.0)

NOTIFICATION_IMAGE_TYPE_BUTTON_7 

Image for button 7 (Since 5.0)

NOTIFICATION_IMAGE_TYPE_BUTTON_8 

Image for button 8 (Since 5.0)

NOTIFICATION_IMAGE_TYPE_BUTTON_9 

Image for button 9 (Since 5.0)

NOTIFICATION_IMAGE_TYPE_BUTTON_10 

Image for button 10 (Since 5.0)

Enumeration for notification launch option type.

Since :
2.3.1
Enumerator:
NOTIFICATION_LAUNCH_OPTION_APP_CONTROL 

Launching with app control

Enumeration for notification LED operation.

Since :
2.3.1
Enumerator:
NOTIFICATION_LED_OP_OFF 

Default value. Disable the LED notification

NOTIFICATION_LED_OP_ON 

Turn on the LED with default color

NOTIFICATION_LED_OP_ON_CUSTOM_COLOR 

Turn on the LED with custom color

Enumeration for notification layout type.

Since :
2.3.1
Enumerator:
NOTIFICATION_LY_NONE 

Default

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. notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from removing by user since tizen 3.0

NOTIFICATION_LY_ONGOING_PROGRESS 

Layout for ongoing notification. Used to display progress

NOTIFICATION_LY_EXTENSION 

Layout for extended notification (Since 4.0)

Enumeration for notification operation data code.

Since :
2.3.1
Enumerator:
NOTIFICATION_OP_DATA_MIN 

Default

NOTIFICATION_OP_DATA_TYPE 

Operation type

NOTIFICATION_OP_DATA_PRIV_ID 

Private ID

NOTIFICATION_OP_DATA_NOTI 

Notification handler

NOTIFICATION_OP_DATA_EXTRA_INFO_1 

Reserved

NOTIFICATION_OP_DATA_EXTRA_INFO_2 

Reserved

Enumeration for notification operation code.

Since :
2.3.1
Enumerator:
NOTIFICATION_OP_NONE 

Default

NOTIFICATION_OP_INSERT 

Notification inserted

NOTIFICATION_OP_UPDATE 

Notification updated

NOTIFICATION_OP_DELETE 

Notification deleted

NOTIFICATION_OP_DELETE_ALL 

Notifications deleted

NOTIFICATION_OP_REFRESH 

(Deprecated Since 2.3.1)

NOTIFICATION_OP_SERVICE_READY 

Notification service is ready

Enumeration for Private ID.

Since :
2.3.1
Enumerator:
NOTIFICATION_PRIV_ID_NONE 

Internally set priv_id

Enumeration for notification property.

Since :
2.3.1
Enumerator:
NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE 

Display only SIM card inserted

NOTIFICATION_PROP_DISABLE_APP_LAUNCH 

Disable application launch when it selected

NOTIFICATION_PROP_DISABLE_AUTO_DELETE 

Disable auto delete when it selected

NOTIFICATION_PROP_LAUNCH_UG 

Notification Tray should launch application using appsvc API (Deprecated since 2.3.1)

NOTIFICATION_PROP_DISABLE_TICKERNOTI 

Use notification_set_display_applist API (Deprecated since 2.3.1)

NOTIFICATION_PROP_PERMANENT_DISPLAY 

The notification will not be removed (Deprecated since 2.3.1)

NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT 

Disable update when it inserted.

NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE 

Disable update when it deleted.

NOTIFICATION_PROP_VOLATILE_DISPLAY 

Deleted when device is rebooted eventhough NOTIFICATION_TYPE_NOTI type

Enumeration for notification sound type.

Since :
2.3.1
Enumerator:
NOTIFICATION_SOUND_TYPE_NONE 

Default value. no sound

NOTIFICATION_SOUND_TYPE_DEFAULT 

Default sound

NOTIFICATION_SOUND_TYPE_USER_DATA 

User sound data

Enumeration for notification text type.

Since :
2.3.1
Enumerator:
NOTIFICATION_TEXT_TYPE_NONE 

None

NOTIFICATION_TEXT_TYPE_TITLE 

Title

NOTIFICATION_TEXT_TYPE_CONTENT 

Content

NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF 

Content for content display option is off of the Settings

NOTIFICATION_TEXT_TYPE_EVENT_COUNT 

Text to display event count

NOTIFICATION_TEXT_TYPE_INFO_1 

Box contents 1

NOTIFICATION_TEXT_TYPE_INFO_SUB_1 

Box contents 1-1

NOTIFICATION_TEXT_TYPE_INFO_2 

Box contents 2

NOTIFICATION_TEXT_TYPE_INFO_SUB_2 

Box contents 2-1

NOTIFICATION_TEXT_TYPE_INFO_3 

Box contents 3

NOTIFICATION_TEXT_TYPE_INFO_SUB_3 

Box contents 3-1

NOTIFICATION_TEXT_TYPE_GROUP_TITLE 

Group title

NOTIFICATION_TEXT_TYPE_GROUP_CONTENT 

Group content

NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF 

Group content for content display option is off of the Settings

NOTIFICATION_TEXT_TYPE_BUTTON_1 

Text on button 1

NOTIFICATION_TEXT_TYPE_BUTTON_2 

Text on button 2

NOTIFICATION_TEXT_TYPE_BUTTON_3 

Text on button 3

NOTIFICATION_TEXT_TYPE_BUTTON_4 

Text on button 4

NOTIFICATION_TEXT_TYPE_BUTTON_5 

Text on button 5

NOTIFICATION_TEXT_TYPE_BUTTON_6 

Text on button 6

NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER 

Guide text on the message reply box(Since 3.0)

NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON 

Text on button the on message reply box(Since 3.0)

NOTIFICATION_TEXT_TYPE_CONTENT_EXTENSION 

Content for extended notification (Since 4.0)

NOTIFICATION_TEXT_TYPE_BUTTON_7 

Text on button 7 (Since 5.0)

NOTIFICATION_TEXT_TYPE_BUTTON_8 

Text on button 8 (Since 5.0)

NOTIFICATION_TEXT_TYPE_BUTTON_9 

Text on button 9 (Since 5.0)

NOTIFICATION_TEXT_TYPE_BUTTON_10 

Text on button 10 (Since 5.0)

Enumeration for notification type.

Since :
2.3.1
Enumerator:
NOTIFICATION_TYPE_NONE 

None

NOTIFICATION_TYPE_NOTI 

Notification type

NOTIFICATION_TYPE_ONGOING 

Ongoing type

Enumeration for notification variable parameter type.

Since :
2.3.1
Enumerator:
NOTIFICATION_VARIABLE_TYPE_NONE 

Variable parameter type is NONE

NOTIFICATION_VARIABLE_TYPE_INT 

Variable parameter type is int

NOTIFICATION_VARIABLE_TYPE_DOUBLE 

Variable parameter type is double

NOTIFICATION_VARIABLE_TYPE_STRING 

Variable parameter type is string

NOTIFICATION_VARIABLE_TYPE_COUNT 

Variable parameter type is count

Enumeration for notification vibration type.

Since :
2.3.1
Enumerator:
NOTIFICATION_VIBRATION_TYPE_NONE 

Default value. No vibration

NOTIFICATION_VIBRATION_TYPE_DEFAULT 

Default vibrate pattern

NOTIFICATION_VIBRATION_TYPE_USER_DATA 

User vibration data

Enumeration for notification block state.

Since :
3.0
Enumerator:
NOTIFICATION_BLOCK_STATE_ALLOWED 

The app is allowed to post notifications

NOTIFICATION_BLOCK_STATE_BLOCKED 

The app is not allowed to post any notifications

NOTIFICATION_BLOCK_STATE_DO_NOT_DISTURB 

User set do not disturb mode

Enumeration for permission.

Since :
3.0
Enumerator:
NOTIFICATION_PERMISSION_TYPE_NONE 

None

NOTIFICATION_PERMISSION_TYPE_DELETE 

Delete

NOTIFICATION_PERMISSION_TYPE_UPDATE 

Update


Function Documentation

Adds a button on the notification.

Since :
3.0
Parameters:
[in]notiNotification handle
[in]button_indexButton index
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    char *pkgname = NULL;

    // Do something

    noti_err = notification_add_button(noti, NOTIFICATION_BUTTON_1);

    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_clone ( notification_h  noti,
notification_h clone 
)

Creates a notification clone.

Newly created notification handle is returned.

Since :
2.3.1
Remarks:
This cloned notification handle should be freed using notification_free().
Parameters:
[in]notiThe notification handle
[out]cloneThe newly created notification handle that has same with input noti
Returns:
NOTIFICATION_ERROR_NONE if success, otherwise any other value if failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_type_e
Sample code:
#include <notification.h>

{
    notification_h noti = notification_create(NOTIFICATION_TYPE_NOTI);
    notification_h clone = NULL;

    notification_clone(noti, &clone);

    // Do something

}

Creates internal structure data and returns a notification handle.

Available type is NOTIFICATION_TYPE_NOTI and NOTIFICATION_TYPE_ONGOING. NOTIFICATION_TYPE_NOTI is remaining notification data even if device is restarted. NOTIFICATION_TYPE_ONGOING can display progress on a notification with NOTIFICATION_LY_ONGOING_PROGRESS layout.

Since :
2.3.1
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. The returned value should be released using notification_free().
Parameters:
[in]typeThe notification type
Returns:
Notification handle(notification_h) on success, otherwise NULL on failure
Exceptions:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
NOTIFICATION_ERROR_OUT_OF_MEMORYOut of memory
NOTIFICATION_ERROR_IO_ERRORI/O error
See also:
notification_type_e
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    // Do something

    notification_free(noti);
}
notification_h notification_create_from_template ( const char *  template_name)

Loads a notification template from the notification database.

An application can load a saved template and post it. An application can load only templates that it has saved.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Remarks:
The returned handle should be destroyed using notification_free(). The specific error code can be obtained using get_last_result(). Error codes are described in the Exception section. If an invalid template name is given, the result will be set to NOTIFICATION_ERROR_FROM_DB.
Parameters:
[in]template_nameTemplate name
Returns:
Notification handle on success, NULL on failure
Exceptions:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
NOTIFICATION_ERROR_OUT_OF_MEMORYOut of memory
NOTIFICATION_ERROR_FROM_DBError from DB query
See also:
notification_h
notification_save_as_template()
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;

    noti = notification_create_from_template("CALL_ACCEPT");
    if (noti == NULL)
        return;

}

Deletes a notification with the given handle.

notification_delete() removes notification data from database and notification_free() releases memory of notification data.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Parameters:
[in]notiThe notification handle
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    // Do something

    noti_err = notification_delete(noti);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Deletes all notifications of the given type.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Parameters:
[in]typeNotification type
Returns:
NOTIFICATION_ERROR_NONE if success, other value if failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_delete_all(NOTIFICATION_TYPE_NOTI);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Frees the internal structure data of a notification handle.

Internal data of a notification handle is released. Data of the inserted notification is not deleted.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    // Do something

    noti_err = notification_free(noti);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_auto_remove ( notification_h  noti,
bool *  auto_remove 
)

Gets the 'auto remove' option of the active notification.

The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true.

Since :
3.0
Parameters:
[in]notiNotification handle
[out]auto_removeAuto remove option
Returns:
NOTIFICATION_ERROR_NONE On success, other value on failure
Return values:
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_h
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    bool auto_remove;

    // Do something

    noti_err = notification_get_auto_remove(noti, &auto_remove);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_display_applist ( notification_h  noti,
int *  applist 
)

Gets the application list displaying the notification from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]applistThe display application list
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    int applist = 0;

    noti_err = notification_get_display_applist(noti, &applist);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_event_handler ( notification_h  noti,
notification_event_type_e  event_type,
app_control_h event_handler 
)

Gets the event handler of a specific event.

Since :
3.0
Remarks:
You must release event_handler using app_control_destroy().
Parameters:
[in]notiThe notification handle
[in]event_typeLaunching option type
[out]event_handlerThe handler of App Control
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_event_type_e
Sample code:
#include <notification.h>

{
    app_control_h app_control = NULL;

    // Do something

    noti_err = notification_get_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, &app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }

    app_control_destroy(app_control);
}
int notification_get_extension_image_size ( notification_h  noti,
int *  height 
)

Gets the image height for the extended notification.

Since :
4.0
Parameters:
[in]notiThe notification handle
[out]heightThe image height
Returns:
NOTIFICATION_ERROR_NONE On success, otherwise a negative error value
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_set_extension_image_size()
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    int height;

    // Do something

    noti_err = notification_get_extension_image_size(noti, &height);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_get_image ( notification_h  noti,
notification_image_type_e  type,
char **  image_path 
)

Gets the absolute path of an image file.

Since :
2.3.1
Remarks:
Do not free image_path. It will be freed when notification_free() is called.
Parameters:
[in]notiNotification handle
[in]typeNotification image type
[out]image_pathImage file full path
Returns:
NOTIFICATION_ERROR_NONE on success, other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
See also:
notification_image_type_e
notification_create()
Sample code:
#include <notification.h>

{
    char *image_path = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_get_insert_time ( notification_h  noti,
time_t *  ret_time 
)

Gets an insertion timestamp of the notification.

If ret_time is 0, this notification data is not inserted before.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]ret_timeThe return time value
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    time_t ret_time;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_get_insert_time(noti, &ret_time);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}

Gets the launch option from the notification handle.

Since :
2.3.1
Remarks:
You must release option using app_control_destroy().
Parameters:
[in]notiThe notification handle
[in]typeLaunching option type
[out]optionThe pointer of App Control handler
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    app_control_h app_control = NULL;

    noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    // Do something

    app_control_destroy(app_control);
}

Gets the layout of the notification view from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]layoutThe type of layout
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
See also:
notification_ly_type_e
int notification_get_led ( notification_h  noti,
notification_led_op_e operation,
int *  led_argb 
)

Gets the LED displaying option from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]operationThe LED notification operation
[out]led_argbThe notification LED color
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_led_op_e type;

    noti_err = notification_get_led(noti, &type, NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_led_time_period ( notification_h  noti,
int *  on_ms,
int *  off_ms 
)

Gets the time period of flashing the LED from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]on_msThe time for turning on the LED
[out]off_msThe time for turning on the LED
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    int led_on_ms = 0;
    int led_off_ms = 0;

    noti_err = notification_get_led_time_period(noti, &led_on_ms, &led_off_ms);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Gets notification block state.

The user can set the notification block state in settings. The block state indicates whether or not notifications can be posted. Additionally only notifications to the notification panel are allowed in "Do not disturb mode". Sound, Vibrate and Active/Instant notifications are blocked.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Parameters:
[out]stateNotification block state
Returns:
NOTIFICATION_ERROR_NONE On success, other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
NOTIFICATION_ERROR_OUT_OF_MEMORYout of memory
NOTIFICATION_ERROR_IO_ERRORI/O Error
NOTIFICATION_ERROR_SERVICE_NOT_READYNo response from notification service
See also:
notification_block_state_e
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_block_state_e state;

    // Do something

    noti_err = notification_get_noti_block_state(&state);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_pkgname ( notification_h  noti,
char **  pkgname 
)

Gets the package name of the notification.

Since :
3.0
Remarks:
Do not free pkgname. It will be freed when notification_free() is called.
Parameters:
[in]notiNotification handle
[out]pkgnameThe package name of the notification
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    char *pkgname = NULL;

    // Do something

    noti_err = notification_get_pkgname(noti, &pkgname);

    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }

}
int notification_get_progress ( notification_h  noti,
double *  percentage 
)

Gets the progress from the notification handle.

Since :
2.3.1
Remarks:
At the end of the operation, the progress should be 1.0.
Parameters:
[in]notiThe notification handle
[out]percentageThe progress percentage
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    double percentage = 0.0;

    noti_err = notification_get_progress(noti, &percentage);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_property ( notification_h  noti,
int *  flags 
)

Gets the property of the notification from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]flagsThe notification property
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    int flags = 0;

    noti_err = notification_get_property(noti, &flags);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_size ( notification_h  noti,
double *  size 
)

Gets the progress size.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]sizeThe progress size
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    double size = 0.0;

    noti_err = notification_get_size(noti, &size);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_get_sound ( notification_h  noti,
notification_sound_type_e type,
const char **  path 
)

Gets the sound type from the notification handle.

Since :
2.3.1
Remarks:
Do not free path. It will be freed when notification_free() is called.
Parameters:
[in]notiThe notification handle
[out]typeThe notification sound type
[out]pathThe user sound file path
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_sound_type_e type = NOTIFICATION_SOUND_TYPE_NONE;

    noti_err = notification_get_sound(noti, &type, NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_tag ( notification_h  noti,
const char **  tag 
)

Gets the tag of the notification handle.

Since :
2.3.1
Remarks:
Do not free tag. It will be freed when notification_free() is called.
Parameters:
[in]notiNotification handle
[out]tagTag for loading notification handle
Returns:
NOTIFICATION_ERROR_NONE on success, other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_set_tag()
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    const char *tag = NULL;

    // Do something

    noti_err = notification_get_tag(noti, &tag);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_text ( notification_h  noti,
notification_text_type_e  type,
char **  text 
)

Gets the text from the notification handle.

Since :
2.3.1
Remarks:
Do not free text. It will be freed when notification_free() is called.
Parameters:
[in]notiThe notification handle
[in]typeThe notification text type
[out]textThe notification text
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    char *text = NULL;

    noti_err = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_get_time ( notification_h  noti,
time_t *  ret_time 
)

Gets a timestamp.

If ret_time is 0, time information is not set before.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]ret_timeThe return time value
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
See also:
notification_create()
Sample code:
#include <notification.h>

{
    time_t ret_time;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_get_time(noti, &ret_time);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_get_time_from_text ( notification_h  noti,
notification_text_type_e  type,
time_t *  time 
)

Gets the timestamp from the notification handle.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification text type
[in]timeThe pointer of time stamp
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().

Gets the type of a notification.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[out]typeThe notification type
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_type_e type;

    noti_err = notification_get_type(noti, &type);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_get_vibration ( notification_h  noti,
notification_vibration_type_e type,
const char **  path 
)

Gets the vibrate type from the notification handle.

Since :
2.3.1
Remarks:
Do not free path. It will be freed when notification_free() is called.
Parameters:
[in]notiThe notification handle
[out]typeThe notification sound type
[out]pathThe user vibration file path
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    int noti_err;
    notification_vibration_type_e type;
    char *path;

    noti_err = notification_get_vibration(noti, &type, &path);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Loads a notification from the notification's database with the tag.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. The returned value should be released using notification_free().
Parameters:
[in]tagTag for loading notification handle
Returns:
Notification handle(notification_h) on success, NULL on failure
Exceptions:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
NOTIFICATION_ERROR_OUT_OF_MEMORYOut of memory
See also:
notification_type_e
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;

    noti = notification_load_by_tag(tag);
    if (noti == NULL)
        return;

    // Do something

}

Posts a notification.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Parameters:
[in]notiNotification handle
Returns:
NOTIFICATION_ERROR_NONE if success, other value if failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
Postcondition:
notification_free().
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_post(noti);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Removes a button on the notification.

Since :
3.0
Parameters:
[in]notiNotification handle
[in]button_indexButton index
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    char *pkgname = NULL;

    // Do something

    noti_err = notification_remove_button(noti, NOTIFICATION_BUTTON_1);

    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_save_as_template ( notification_h  noti,
const char *  template_name 
)

Saves a notification template to the notification database.

An application can save the created notification as a template for later reuse. If the template has the same name as a saved one, the saved template will be overwritten. A saved template can be loaded only by the application which saved it. All templates are removed when the application package is uninstalled.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Remarks:
The number of templates is limited to 10. When you try to add more than 10 templates, NOTIFICATION_ERROR_MAX_EXCEEDED will be returned.
Parameters:
[in]notiNotification handle
[in]template_nameTemplate name
Returns:
NOTIFICATION_ERROR_NONE On success, other value on failure
Return values:
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
NOTIFICATION_ERROR_IO_ERRORI/O error
NOTIFICATION_ERROR_OUT_OF_MEMORYOut of memory
NOTIFICATION_ERROR_MAX_EXCEEDEDMax notification count exceeded
See also:
notification_h
notification_create_from_template()
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_h noti = NULL;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    // add the content you want to use for the template.

    noti_err = notification_save_as_template(noti, "CALL_ACCEPT");
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_free(noti);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_set_auto_remove ( notification_h  noti,
bool  auto_remove 
)

Sets the 'auto remove' option of the active notification.

The 'auto remove' option lets the active notification be removed several seconds after it shows. Default value is true.

Since :
3.0
Remarks:
When 'auto_remove' is set as false, the active notification will not be removed as long as the user removes the active notification or the app which posted the active notification removes the active notification.
Parameters:
[in]notiNotification handle
[in]auto_removeAuto remove option
Returns:
NOTIFICATION_ERROR_NONE On success, other value if failure
Return values:
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_h
notification_get_auto_remove
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    // Do something

    noti_err = notification_set_auto_remove(noti, false);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_set_display_applist ( notification_h  noti,
int  applist 
)

Sets applications to display the notification.

All display application is enabled(NOTIFICATION_DISPLAY_APP_ALL) if you do not call this function.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]applistThe with | operation
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:

Sets the handler for a specific event.

When some event occurs on notification, application launched by app_control_send_launch_request with app_control handle.
Setting event handler of a button means that the notification will show the button.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/appmanager.launch
Remarks:
Since 4.0, http://tizen.org/privilege/appmanager.launch privilege is additionally required.
Parameters:
[in]notiThe notification handle
[in]event_typeEvent type
[in]event_handlerApp control handle
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_event_type_e
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    app_control_h app_control = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    // Do something

    app_control_create(&app_control);
    app_control_set_app_id(app_control, "org.tizen.app");

    // Do something

    noti_err = notification_set_event_handler(noti, NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        app_control_destroy(app_control);
        notification_free(noti);
        return;
    }

    app_control_destroy(app_control);
}
int notification_set_extension_image_size ( notification_h  noti,
int  height 
)

Sets the image height for the extended notification.

The image is shown under the notification's text. The application can set the image height. The image is modified to fit into the height set by this function. The image can be scaled down and/or cropped. If height is 0, the default value is used. The default height depends on the screen size.

Since :
4.0
Parameters:
[in]notiThe notification handle
[in]heightThe image height
Returns:
NOTIFICATION_ERROR_NONE On success, otherwise a negative error value
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_get_extension_image_size()
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_text(noti,
            NOTIFICATION_TEXT_TYPE_CONTENT_EXTENSION,
            "message",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_image(noti,
            NOTIFICATION_IMAGE_TYPE_EXTENSION,
            image_path);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_layout(noti, NOTIFICATION_LY_EXTENSION);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_extension_image_size(noti, 20);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    // Do something
}
int notification_set_image ( notification_h  noti,
notification_image_type_e  type,
const char *  image_path 
)

Sets an absolute path for an image file to display on the notification view.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification image type
[in]image_pathThe image file full path
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
See also:
notification_image_type_e
notification_create()
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}

Sets the launch option for a notification.

When notification data selected in display application, application launched by app_control_send_launch_request with app_control handle.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/appmanager.launch
Remarks:
Since 4.0, http://tizen.org/privilege/appmanager.launch privilege is additionally required.
Parameters:
[in]notiThe notification handle
[in]typeLaunching option type
[in]optionApp Control handler
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    app_control_h app_control = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    // Do something

    app_control_create(&app_control);
    app_control_set_app_id(app_control, "org.tizen.app");

    // Do something

    noti_err = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        app_control_destroy(app_control);
        notification_free(noti);
        return;
    }

    app_control_destroy(app_control);
}

Sets the layout of the notification view.

Caller can set displaying layout of notification.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]layoutThe type of layout
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
See also:
notification_ly_type_e
int notification_set_led ( notification_h  noti,
notification_led_op_e  operation,
int  led_argb 
)

Sets the LED displaying option.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]operationThe LED notification operation
[in]led_argbThe notification LED color
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_set_led(noti, NOTIFICATION_LED_OP_ON, NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_set_led_time_period ( notification_h  noti,
int  on_ms,
int  off_ms 
)

Sets the time period of flashing the LED.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]on_msThe time for turning on the LED
[in]off_msThe time for turning off the LED
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_set_led_time_period(noti, 100, 100);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_set_progress ( notification_h  noti,
double  percentage 
)

Sets the initial progress for the ongoing type.

After the notification_post() call, the progress is not updated.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]percentageThe progress percentage
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_progress(noti, 0.0);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_set_property ( notification_h  noti,
int  flags 
)

Sets the property of the notification.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]flagsThe property with | operation
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;
    bundle *b = NULL;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE | NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_set_size ( notification_h  noti,
double  size 
)

Sets the initial size for the ongoing type.

After notification_post() call, the size is not updated.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]sizeThe double type size
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_size(noti, 0.0);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_set_sound ( notification_h  noti,
notification_sound_type_e  type,
const char *  path 
)

Sets the sound type for the notification.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification sound type
[in]pathThe user sound file path
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_set_sound(noti, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_set_tag ( notification_h  noti,
const char *  tag 
)

Sets the tag of the notification handle.

Since :
2.3.1
Parameters:
[in]notiNotification handle
[in]tagTag for loading notification handle
Returns:
NOTIFICATION_ERROR_NONE on success, other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
See also:
notification_get_tag()
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    // Do something

    noti_err = notification_set_tag(noti, tag);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}
int notification_set_text ( notification_h  noti,
notification_text_type_e  type,
const char *  text,
const char *  key,
int  args_type,
  ... 
)

Sets the text to display on the notification view.

Sets title, content string. If the text is formatted data (only d, f, s are supported), type - value pair should be set. If d, the type NOTIFICATION_VARIABLE_TYPE_INT and the value is an integer. If f, the type NOTIFICATION_VARIABLE_TYPE_DOUBLE and the value is a double. If s, the type NOTIFICATION_VARIABLE_TYPE_STRING and the value is a string. If the type is NOTIFICATION_VARIABLE_TYPE_COUNT, notification count is displaying with text. If the value is NOTIFICATION_COUNT_POS_LEFT, count is displayed at the left of the text. If the value is NOTIFICATION_COUNT_POS_IN, count is displayed in the text when text has d format. If the value is NOTIFICATION_COUNT_POS_RIGHT, count is displayed at the right of the text. Variable parameters should be terminated NOTIFICATION_VARIABLE_TYPE_NONE.

Note that You can display the translated contents according to the language of the system. The application must supply a String KEY as the fourth argument to support localization. If the language on the system changes, the contents of the notification are also translated.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification text type
[in]textThe basic text
[in]keyThe text key for localization
[in]args_typeThe variable parameter that type - value pair
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
notification handle should be created by notification_create().
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE,
            "I'm Title", "IDS_APP_BODY_IM_TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}
int notification_set_text_input ( notification_h  noti,
int  text_input_max_length 
)

Sets a text input box to reply directly on the notification.

When you add a text input to the active notification, the notification UI will show a text input with a button. So, the user can enter any text and press the button to confirm the text as a input. You can edit some UI component that is related to the text input. First, you can add placeholder text to guide the user using notification_set_text() with NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER type. You also can edit button for the text input. For setting just a text to the button, you can set the text using notification_set_text() with NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON type. If you want to show image button, you can set an image for the button using notification_set_image() with NOTIFICATION_IMAGE_TYPE_TEXT_INPUT_BUTTON type.

Note that you should set an app_control for handling the event for user input using notification_set_event_handler(). NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON is the event type for the text input. You can get the text the user enters in the app_control handle that is passed as a result of the event. The app_control will contain APP_CONTROL_DATA_TEXT key, so you can get the text using app_control_get_extra_data() using APP_CONTROL_DATA_TEXT key. The value will contain the text user enters.

Note that you are able to make the switching button to the text input box. You have to set the app_control which you will set in a text input box to the switching button. Refer to the second sample code.

Since :
3.0
Parameters:
[in]notiNotification handle
[in]text_input_max_lengthThe maximum value which can be inputted
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_h noti = NULL;
    app_control = NULL;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_text_input(noti, 160);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_text(noti,
            NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER,
            "Text message",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_text(noti,
            NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON,
            "SEND",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_display_applist(noti,
            NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    // Do something

    noti_err = app_control_create(&app_control);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = app_control_set_app_id(app_control, appid);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = notification_set_event_handler(noti,
            NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON,
            app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = app_control_destroy(app_control);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err  = notification_post(noti);
    if(noti_err != NOTIFICATION_ERROR_NONE)
        return;

}


{
    int noti_err = NOTIFICATION_ERROR_NONE;
    notification_h noti = NULL;
    app_control = NULL;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL) {
        return;
    }

    noti_err = notification_set_text_input(noti, 160);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_text(noti,
            NOTIFICATION_TEXT_TYPE_TEXT_INPUT_PLACEHOLDER,
            "Text message",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_text(noti,
            NOTIFICATION_TEXT_TYPE_TEXT_INPUT_BUTTON,
            "SEND",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_add_button(notification, NOTIFICATION_BUTTON_1);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_text(notification,
            NOTIFICATION_TEXT_TYPE_BUTTON_1,
            "reply",
            NULL,
            NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_display_applist(noti,
            NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_ACTIVE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    // Do something

    noti_err = app_control_create(&app_control);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = app_control_set_app_id(app_control, appid);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err = notification_set_event_handler(notification,
            NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1,
            app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = notification_set_event_handler(noti,
            NOTIFICATION_EVENT_TYPE_CLICK_ON_TEXT_INPUT_BUTTON,
            app_control);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

    noti_err = app_control_destroy(app_control);
    if (noti_err != APP_CONTROL_ERROR_NONE)
        return;

    noti_err  = notification_post(noti);
    if(noti_err != NOTIFICATION_ERROR_NONE)
        return;
}
int notification_set_time ( notification_h  noti,
time_t  input_time 
)

Sets a timestamp.

If input_time is 0, time information is taken from the current time.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]input_timeThe input time. If you want the time stamp to not be shown, set this as NOTIFICATION_DO_NOT_SHOW_TIME_STAMP
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
See also:
notification_create()
NOTIFICATION_DO_NOT_SHOW_TIME_STAMP
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
        return;

    noti_err = notification_set_time(noti, time(NULL));
    if (noti_err != NOTIFICATION_ERROR_NONE) {
        notification_free(noti);
        return;
    }
}

Sets the timestamp to display on the notification view.

The timestamp will be converted to a formatted string and it will be displayed on the set text area.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification text type
[in]timeThe timestamp
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Notification handle should be created by notification_create().
int notification_set_vibration ( notification_h  noti,
notification_vibration_type_e  type,
const char *  path 
)

Sets the vibration type for the notification.

Since :
2.3.1
Parameters:
[in]notiThe notification handle
[in]typeThe notification vibration type
[in]pathThe user vibration file path
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid parameter
Sample code:
#include <notification.h>

{
    notification_h noti = NULL;
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_set_vibration(noti, NOTIFICATION_VIBRATION_TYPE_DEFAULT, NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;

}

Updates notification data.

The updated notification will appear in the notification area.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/notification
Parameters:
[in]notiThe notification handle that is created by notification_create()
Returns:
NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
Return values:
NOTIFICATION_ERROR_NONESuccess
NOTIFICATION_ERROR_PERMISSION_DENIEDThe Permission denied
NOTIFICATION_ERROR_INVALID_PARAMETERInvalid input value
NOTIFICATION_ERROR_NOT_EXIST_IDPriv ID does not exist
Sample code:
#include <notification.h>

{
    int noti_err = NOTIFICATION_ERROR_NONE;

    noti_err = notification_update(NULL);
    if (noti_err != NOTIFICATION_ERROR_NONE)
        return;
}