* else @c false
* @remarks Selecting the posted notification in the notification area leads to launch of the associated application
* if %NotificationRequest is bound to the destination application.
+ * @see SetAlertText()
*/
explicit NotificationRequest(bool appBinding = true);
* @param[in] text The alert text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c text is empty or the length of @c text is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
- * @remarks @c text is displayed according to notification layout, and the length of the text is depends on the font attributes or variable font width.
+ * @remarks @c text is displayed according to notification layout, and the length of the text is depends on the font attributes or variable font width. @n
+ * @c text is mandatory for a notification.
*/
result SetAlertText(const Tizen::Base::String& text);
* @param[in] title The title text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c title is empty or the length of @c title is greater than Shell::MAX_NOTIFICATION_TITLE_LENGTH.
+ * @remarks If @c title is not set, the application name is displayed.
*/
result SetTitleText(const Tizen::Base::String& title);
* @param[in] iconPath The file path of the icon image
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified path is invalid.
+ * @remarks If @c iconPath is not set, the application icon is displayed.
*/
result SetIconFilePath(const Tizen::Base::String& iconPath);
Tizen::Base::String GetSoundFilePath(void) const;
/**
- * Sets the file path of the sound file that is played for the notification message. @n
- * The sound file should be in the WAVE file format.
+ * Sets the file path of the sound file that is played for the notification message.
*
* @since 2.0
*
* @param[in] soundPath The file path of the sound file
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified path is invalid.
- * @remarks If the format of the sound file is not valid, then the sound file is not played properly when the notification message is displayed.
+ * @remarks If the format of the sound file is not valid, then the sound file is not played properly when the notification message is displayed. @n
+ * If @c soundPath is not set, the default sound is played when the %NotificationRequest instance is delivered to the NotificationManager::Notify() method.
*/
result SetSoundFilePath(const Tizen::Base::String& soundPath);
* @return An error code
* @param[in] value The progress value
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified @c value is less than @c 0, or
- * the specified @c value does not lie between @c 0 and @c 100 for Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
+ * - The specified @c value is less than @c 0.
+ * - The specified @c value does not lie between @c 0 and @c 100 for Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+ * - The notification type for an ongoing activity is not set.
* @exception E_INVALID_OPERATION This instance is in an invalid state. @n
* OngoingActivityType must be either Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE or Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+ * @see SetOngoingActivityType()
*/
result SetOngoingActivityProgress(int value);
* @param[in] pTextList A list of detail information text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c textList is empty or the length of individual text is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
- * @remarks This information is only meaningful when the notification style is Shell::NOTIFICATION_STYLE_NORMAL. @n
+ * @remarks This information is only meaningful when the notification style is Shell::NOTIFICATION_STYLE_NORMAL. @n
* Use the tab(\\t) character to separate the columns.
- *
*/
result SetMessageTextList(const Tizen::Base::Collection::IList* pTextList);
* @param[in] notificationCountText The event count text
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c eventCountText is empty or the length of @c eventCountText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+ * @remarks This information is only meaningful when the notification style is Shell::NOTIFICATION_STYLE_NORMAL.
*/
result SetNotificationCountText(const Tizen::Base::String& notificationCountText);
const int badgeOffset = notifyRequest.GetBadgeOffset();
const String& contentText = notifyRequest.GetAlertText();
// Allow change the badge without other properties.
- if (badgeNumber != -1 || badgeOffset != -1)
+ if (badgeNumber != -1 || badgeOffset != 0)
{
// Set - Badge
if (badgeOffset != 0)
}
else
{
- if (isOngoing && needUpdate)
+ if (isOngoing)
{
r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_NONE, NULL));
}
// Set - service
int retVal = SERVICE_ERROR_NONE;
+ int previousDisplaySet = NOTIFICATION_DISPLAY_APP_ALL;
+ int newDisplaySet = 0;
r = arg.Construct(launchArguments);
SysTryCatch(NID_SHELL, !IsFailed(r), r = E_OPERATION_FAILED, r, "[E_OPERATION_FAILED] Failed to construct _AppArg.");
r = E_OPERATION_FAILED;
break;
}
+
+ r = ConvertNotificationResult(notification_get_display_applist(notiHandle, &previousDisplaySet));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
+
+ newDisplaySet = previousDisplaySet & ~NOTIFICATION_DISPLAY_APP_TICKER;
+ r = ConvertNotificationResult(notification_set_display_applist(notiHandle, newDisplaySet));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
}
// insert for new notification
}
else
{
- int previousDisplaySet = NOTIFICATION_DISPLAY_APP_ALL;
- if (isOngoing)
- {
- r = ConvertNotificationResult(notification_get_display_applist(notiHandle, &previousDisplaySet));
- SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
-
- int newDisplaySet = previousDisplaySet & ~NOTIFICATION_DISPLAY_APP_TICKER;
- r = ConvertNotificationResult(notification_set_display_applist(notiHandle, newDisplaySet));
- SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
- }
-
r = ConvertNotificationResult(notification_update(notiHandle));
SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Updating the notification failed. notiPrivateId(%d)", GetErrorMessage(r), notiPrivateId);
+ }
- if (isOngoing)
- {
- r = ConvertNotificationResult(notification_set_display_applist(notiHandle, previousDisplaySet));
- SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
- }
+ if (isOngoing)
+ {
+ r = ConvertNotificationResult(notification_set_display_applist(notiHandle, previousDisplaySet));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Setting the notification area failed.", GetErrorMessage(r));
}
CATCH: