Hello Everyone,
I´m new to Tizen, and I tried to develop a wearable native App(2.3.2) where notifications can be created by clicking on a button. So far it works, but I was wondering if the notifications could be customized.
e.g. I couldn´t manage to insert a button for user interaction on the notifications. Is this possible?
Addituonally, is there a way to customize the popup which is (automatically?) shown everytime when a new notification is created?
And is it possible to delete the timestamp shown under the notification title in the notification tray? I´m also not sure what time there is displayed at all, it seems completely random to me...?
I tried it with DO_NOT_SHOW_TIMESTAMP and variations of notification_set_time, but neither seemed to influence the shown value of the notifications at all.
Below is a part of the code:
void set_notification(appdata_s *ad){
notification_h notification = NULL;
notification = notification_create(NOTIFICATION_TYPE_NOTI);
if(notification != NULL){
notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, "Alarm",
NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
notification_set_time_to_text(notification, time(NULL), NOTIFICATION_TEXT_TYPE_CONTENT);
notification_set_text(notification, NOTIFICATION_TEXT_TYPE_CONTENT, "Failure of Valve 4",
NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
notification_set_display_applist(notification, NOTIFICATION_DISPLAY_APP_ALL);
notification_set_size(notification, 0.5);
notification_set_layout(notification, NOTIFICATION_LY_ONGOING_EVENT );
//notification_add_button(notification,NOTIFICATION_BUTTON_1);
notification_set_vibration(notification, NOTIFICATION_VIBRATION_TYPE_DEFAULT, 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.noti_basicui2");
noti_err = notification_set_launch_option(notification, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL,
(void *) app_control);
if (noti_err != NOTIFICATION_ERROR_NONE) {
notification_free(notification);
return;
}
app_control_destroy(app_control);
notification_post(notification);
}
Thanks for your help & answers!