Tizen Native API
|
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. | |
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 lauch 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. | |
Defines | |
#define | NOTIFICATION_DO_NOT_SHOW_TIME_STAMP -1 |
Notification APIs.
Required Header
#include <notification.h>
Overview
A notification is a message that is displayed on the notification area or the on-going area. It is created to notify information to the user through the application. This API provides functions for creating and inserting and updating notification.
Define Documentation
#define NOTIFICATION_DO_NOT_SHOW_TIME_STAMP -1 |
Do not show time stamp on the notificaion. Could be passed as a argument of notification_set_time()
Typedef Documentation
typedef enum _notification_button_index notification_button_index_e |
Enumeration for button.
- Since :
- 2.4
typedef enum _notifcation_count_pos_type notification_count_pos_type_e |
Enumeration for notification count position in the text.
- Since :
- 2.3
typedef enum _notification_error notification_error_e |
Enumeration for notification errors.
- Since :
- 2.3
typedef enum _notification_event_type notification_event_type_e |
Enumeration for event type on notification.
- Since :
- 2.4
typedef enum _notification_execute_type notification_execute_type_e |
Enumeration for application execution type.
- Since :
- 2.3
typedef struct _notification* notification_h |
Notification handle.
- Since :
- 2.3
typedef enum _notification_image_type notification_image_type_e |
Enumeration for image type.
- Since :
- 2.3
Enumeration for notification lauch option type.
- Since :
- 2.3
typedef enum _notification_led_op notification_led_op_e |
Enumeration for notification LED operation.
- Since :
- 2.3
typedef enum _notification_ly_type notification_ly_type_e |
Enumeration for notification layout type.
- Since :
- 2.3
typedef struct _notification_op notification_op |
The structure for notification operation.
- Since :
- 2.3
typedef enum _notification_op_data_type notification_op_data_type_e |
Enumeration for notification operation data code.
- Since :
- 2.3
typedef enum _notification_op_type notification_op_type_e |
Enumeration for notification operation code.
- Since :
- 2.3
Enumeration for permission.
- Since :
- 2.4
typedef enum _notification_sound_type notification_sound_type_e |
Enumeration for notification sound type.
- Since :
- 2.3
typedef enum _notification_text_type notification_text_type_e |
Enumeration for notification text type.
- Since :
- 2.3
typedef enum _notification_type notification_type_e |
Enumeration for notification type.
- Since :
- 2.3
typedef enum _notification_variable_type notification_variable_type_e |
Enumeration for notification variable parameter type.
- Since :
- 2.3
Enumeration for notification vibration type.
- Since :
- 2.3
Enumeration Type Documentation
Enumeration for notification count position in the text.
- Since :
- 2.3
- Enumerator:
enum _notification_error |
Enumeration for notification errors.
- Since :
- 2.3
- Enumerator:
Enumeration for event type on notification.
- Since :
- 2.4
- Enumerator:
Enumeration for application execution type.
- Since :
- 2.3
- Enumerator:
Enumeration for image type.
- Since :
- 2.3
- Enumerator:
enum _notification_led_op |
Enumeration for notification layout type.
- Since :
- 2.3
- Enumerator:
Enumeration for notification operation data code.
- Since :
- 2.3
Enumeration for notification operation code.
- Since :
- 2.3
- Enumerator:
Enumeration for notification property.
- Since :
- 2.3
- Enumerator:
Enumeration for notification text type.
- Since :
- 2.3
- Enumerator:
enum _notification_type |
Enumeration for notification variable parameter type.
- Since :
- 2.3
- Enumerator:
Enumeration for display application list.
- Since :
- 2.3
- Enumerator:
Enumeration for permission.
- Since :
- 2.4
Function Documentation
int notification_add_button | ( | notification_h | noti, |
notification_button_index_e | button_index | ||
) |
Adds a button on the notification.
- Since :
- 2.4
- Parameters:
-
[in] noti Notification handle [in] button_index Button index
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; char *pkgname = NULL; ... 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
- Remarks:
- This cloned notification handle should be freed using notification_free().
- Parameters:
-
[in] noti The notification handle [out] clone The 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_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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); ... }
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
- Remarks:
- The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- Parameters:
-
[in] type The notification type
- Returns:
- Notification handle(notification_h) on success, otherwise
NULL
on failure
- Return values:
-
notification_h Success NULL Failure
- Exceptions:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory
- See also:
- notification_type_e
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; noti = notification_create(NOTIFICATION_TYPE_NOTI); if(noti == NULL) { return; } ... }
int notification_delete | ( | notification_h | noti | ) |
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
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] noti The notification handle
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- Sample code:
#include <notification.h> ... { notificaton_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; ... noti_err = notification_delete(noti); if(noti_err != NOTIFICATION_ERROR_NONE) { return; } }
int notification_delete_all | ( | notification_type_e | type | ) |
Deletes all notifications of the given type.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] type Notification type
- Returns:
- NOTIFICATION_ERROR_NONE if success, other value if failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- 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; } }
int notification_free | ( | notification_h | noti | ) |
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
- Parameters:
-
[in] noti The notification handle
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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_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 let the active notification be removed in several seconds after it shows. Default value is true.
- Since :
- 2.4
- Parameters:
-
[in] noti Notification handle [out] auto_remove Auto remove option
- Returns:
- NOTIFICATION_ERROR_NONE On success, other value on failure
- Return values:
-
NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { int noti_err = NOTIFICATION_ERROR_NONE; bool auto_remove; ... 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
- Parameters:
-
[in] noti The notification handle [out] applist The display application list
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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.
- Remarks:
- You must release app_control using app_control_destroy().
- Since :
- 2.4
- Parameters:
-
[in] noti The notification handle [in] event_type Launching option type [out] option The pointer of App Control handler
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- notification_event_type_e
- Sample code:
#include <notification.h> ... { app_control_h app_control = NULL; app_control_create(&app_control); ... 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; } }
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
- Remarks:
- Do not free image_path. It will be freed when notification_free() is called.
- Parameters:
-
[in] noti Notification handle [in] type Notification image type [out] image_path image file full path
- Returns:
- NOTIFICATION_ERROR_NONE on success, other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- Notification handle should be created by 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
- Parameters:
-
[in] noti The notification handle [out] ret_time The return time value
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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; } }
int notification_get_launch_option | ( | notification_h | noti, |
notification_launch_option_type | type, | ||
void * | option | ||
) |
Gets the launch option from the notification handle.
- Since :
- 2.3
- Remarks:
- You must release app_control using app_control_destroy().
- Parameters:
-
[in] noti The notification handle [in] type Launching option type [out] option The pointer of App Control handler
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { app_control_h app_control = NULL; app_control_create(&app_control); ... noti_err = notification_get_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&app_control); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); return; } }
int notification_get_layout | ( | notification_h | noti, |
notification_ly_type_e * | layout | ||
) |
Gets the layout of the notification view from the notification handle.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [out] layout The type of layout
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] operation The LED notification operation [out] led_argb The notification LED color
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; notification_led_type_e type = NOTIFICATION_LED_TYPE_NONE; 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
- Parameters:
-
[in] noti The notification handle [out] on_ms The time for turning on the LED [out] off_ms The time for turning on the LED
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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; } }
int notification_get_pkgname | ( | notification_h | noti, |
char ** | pkgname | ||
) |
Gets the package name of the notification.
- Since :
- 2.4
- Parameters:
-
[in] noti Notification handle [out] pkgname The package name of the notification
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; char *pkgname = NULL; ... 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
- Remarks:
- At the end of the operation, the progress should be
1.0
.
- Parameters:
-
[in] noti The notification handle [out] percentage The progress percentage
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] flags The notification property
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] size The progress size
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] type The notification sound type [out] path The user sound file path
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti Notification handle [out] tag tag for loading notification handle
- Returns:
- NOTIFICATION_ERROR_NONE on success, other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- See also:
- notification_set_tag()
- Sample code:
#include <notification.h> ... { int noti_err = NOTIFICATION_ERROR_NONE; const char *tag = NULL; ... 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
- Parameters:
-
[in] noti The notification handle [in] type The notification text type [out] text The notification text
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] ret_time The return time value
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] type The notification text type [in] time The pointer of time stamp
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- Notification handle should be created by notification_create().
int notification_get_type | ( | notification_h | noti, |
notification_type_e * | type | ||
) |
Gets the type of a notification.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [out] type The notification type
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [out] type The notification sound type [out] path The user vibration file path
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_NONE; noti_err = notification_get_vibration(noti, &type, NULL); if(noti_err != NOTIFICATION_ERROR_NONE) { return; } }
notification_h notification_load_by_tag | ( | const char * | tag | ) |
Loads a notification from the notification's database with the tag.
- Since :
- 2.3
- 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.
- Parameters:
-
[in] tag tag for loading notification handle
- Returns:
- Notification handle(notification_h) on success, NULL on failure
- Return values:
-
notification_h Success NULL Failure
- Exceptions:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value NOTIFICATION_ERROR_OUT_OF_MEMORY Out of memory NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- See also:
- notification_type_e
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; noti = notification_load_by_tag(tag); if(noti == NULL) { return; } ... }
int notification_post | ( | notification_h | noti | ) |
Posts a notification.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] noti Notification handle
- Returns:
- NOTIFICATION_ERROR_NONE if success, other value if failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- 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; } }
int notification_remove_button | ( | notification_h | noti, |
notification_button_index_e | button_index | ||
) |
Removes a button on the notification.
- Since :
- 2.4
- Parameters:
-
[in] noti Notification handle [in] button_index Button index
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; char *pkgname = NULL; ... noti_err = notification_remove_button(noti, NOTIFICATION_BUTTON_1); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); 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 let the active notification be removed in several seconds after it shows. Default value is true.
- 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.
- Since :
- 2.4
- Parameters:
-
[in] noti Notification handle [in] auto_remove Auto remove option
- Returns:
- NOTIFICATION_ERROR_NONE On success, other value if failure
- Return values:
-
NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; ... 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 enable(NOTIFICATION_DISPLAY_APP_ALL) if you are not call this API.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [in] applist The with | operation
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER | NOTIFICATION_DISPLAY_APP_INDICATOR); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); return; } } }
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.
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 :
- 2.4
- Parameters:
-
[in] noti The notification handle [in] event_type event type [in] event_handler app control handle
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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; ... 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) { notification_free(noti); return; } app_control_destroy(app_control); }
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
- Parameters:
-
[in] noti The notification handle [in] type The notification image type [in] image_path The image file full path
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, APP_IMAGE_FULL_PATH); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); return; } }
int notification_set_launch_option | ( | notification_h | noti, |
notification_launch_option_type | type, | ||
void * | option | ||
) |
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
- Parameters:
-
[in] noti The notification handle [in] type Launching option type [in] option App Control handler
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; app_control_h app_control = NULL; int noti_err = NOTIFICATION_ERROR_NONE; ... app_control_create(&app_control); app_control_set_app_id(app_control, "org.tizen.app"); ... noti_err = notification_set_launch_option(noti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)app_control); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); return; } app_control_destroy(app_control); }
int notification_set_layout | ( | notification_h | noti, |
notification_ly_type_e | layout | ||
) |
Sets the layout of the notification view.
Caller can set displaying layout of notification.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [in] layout The type of layout
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] operation The LED notification operation [in] led_argb The notification led color
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
- Sample code:
#include <notification.h> ... { notification_h noti = NULL; int noti_err = NOTIFICATION_ERROR_NONE; noti_err = notification_set_led(noti, NOTIFICATION_LED_TYPE_DEFAULT, 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
- Parameters:
-
[in] noti The notification handle [in] on_ms The time for turning on the LED [in] off_ms The time for turning off the LED
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] percentage The progress percentage
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] flags The property with | operation
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] size The double type size
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] type The notification sound type [in] path The user sound file path
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti Notification handle [in] tag tag for loading notification handle
- Returns:
- NOTIFICATION_ERROR_NONE on success, other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- 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; } ... 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.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [in] type The notification text type [in] text The basic text [in] key The text key for localization [in] args_type The variable parameter that type - value pair
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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_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
- Parameters:
-
[in] noti The notification handle [in] input_time The input time. If you want the time stamp is 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_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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_time(noti, time(NULL)); if(noti_err != NOTIFICATION_ERROR_NONE) { notification_free(noti); return; } }
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.
The timestamp will be converted to a formatted string and it will be displayed on the set text area.
- Since :
- 2.3
- Parameters:
-
[in] noti The notification handle [in] type The notification text type [in] time The timestamp
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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
- Parameters:
-
[in] noti The notification handle [in] type The notification vibration type [in] path The user vibration file path
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid 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; } }
int notification_update | ( | notification_h | noti | ) |
Updates notification data.
The updated notification will appear in the notification area.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/notification
- Parameters:
-
[in] noti The notification handle that is created by notification_create()
- Returns:
- NOTIFICATION_ERROR_NONE on success, otherwise any other value on failure
- Return values:
-
NOTIFICATION_ERROR_NONE Success NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value NOTIFICATION_ERROR_NOT_EXIST_ID Priv ID does not exist NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
- Sample code:
#include <notification.h> ... { int noti_err = NOTIFICATION_ERROR_NONE; noti_err = notification_update(NULL); if(noti_err != NOTIFICATION_ERROR_NONE) { return; } }