Tizen D.I.T

Ongoingnotification

D.I.T

#include "Interface/OngoingNotification.h"
#include "dit.h"

OngoingNotification notification = NewOngoingNotification();
//OngoingNotification 모듈 생성
notification->setTitle(notification, "OngoingNotification Title");
//OngoingNotification Title 설정
notification->setIcon(notification, "images/icon1.png");
//OngoingNotification Icon 설정
notification->setText(notification, "OngoingNotification Text");
//OngoingNotification Text 설정
notification->setSound(notification, "sound/sound.mp3");
//OngoingNotification Sound 설정
notification->setProgress(notification, 0.1);
//OngoingNotification Progress 설정
notification->show(notification);
//OngoingNotification 보여주기
notification->setProgress(notification, 0.2);
//OngoingNotification Progress Update

notification->update(notification);
//OngoingNotification 모듈 업데이트

DestroyOngoingNotification(notification);
//OngoingNotification 모듈  삭제

Native

#include <notification.h>

notification_h notification = notification_create (NOTIFICATION_TYPE_ONGOING);
notification_set_display_applist (notification, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
//OngoingNotification 핸들러 생성
notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, "Notification Title", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
//OngoingNotification Title 설정
notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, "Notification Text", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
//OngoingNotification Text 설정
notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, "images/icon1.png");
//OngoingNotification Images 설정
notification_set_sound (notification, NOTIFICATION_SOUND_TYPE_USER_DATA, "sound/sound.mp3");
//OngoingNotification Sound 설정
notification_set_progress (notification, 0.1);
//OngoingNotification Progress 설정
notification_post (notification);
//Notification 보여주기
notification_delete (notification);
//Notification 숨기기

notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, "OngoingNotification Update Title", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
//Notification Title 설정
notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, "OngoingNotification Update Text", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
//Notification Text 설정
notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, "images/icon1_update.png");
//Notification Images 설정
notification_set_sound (notification, NOTIFICATION_SOUND_TYPE_USER_DATA, "sound/sound_update.mp3");
//Notification Sound 설정
notification_set_progress (notification, 0.2);
//Notification Progress 설정
notification_update (notification);
//Notification 업데이트