Class Notification.ActiveStyle

Definition

Namespace:
Tizen.Applications.Notifications
Assembly:
Tizen.Applications.Notification.dll
API Level:
3

Class for generating active style notification.

C#
Copy
public sealed class ActiveStyle : Notification.StyleBase
Inheritance
System.Object
Tizen.Applications.Notifications.Notification.MakerBase
Notification.ActiveStyle

Constructors

View Source

ActiveStyle()

Initializes a new instance of the Notification.ActiveStyle class.

Declaration
C#
Copy
public ActiveStyle()
API Level: 3

Properties

View Source

BackgroundImage

Gets or sets an absolute path for an image file to display on the background of active notification.

Declaration
C#
Copy
public string BackgroundImage { get; set; }
Property Value
Type Description
System.String
API Level: 3
View Source

DefaultButton

Gets or sets the default button to display highlight on the active notification.

Declaration
C#
Copy
public ButtonIndex DefaultButton { get; set; }
Property Value
Type Description
ButtonIndex
Remarks

The default button for display highlight is only reflected on the Tizen TV. If you use this property on other profile, this value has no effect.

API Level: 3
View Source

HiddenByExternalAction

Gets or sets Action which is invoked when the notification is hidden by external factor.

Declaration
C#
Copy
public AppControl HiddenByExternalAction { get; set; }
Property Value
Type Description
AppControl
Remarks

If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by external factor. The property is only reflected on Tizen TV. If you use this API on other profile, this action settings have no effect

See Also
API Level: 4
View Source

HiddenByTimeoutAction

Gets or sets Action which is invoked when there is no any response by user until hide timeout.

Declaration
C#
Copy
public AppControl HiddenByTimeoutAction { get; set; }
Property Value
Type Description
AppControl
Remarks

This action occurs when there is no response to the notification until the delete timeout set by SetRemoveTime(). If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by timeout. The property is only reflected on Tizen TV. If you use this API on other profile, this action settings have no effect

See Also
API Level: 4
View Source

HiddenByUserAction

Gets or sets Action which is invoked when notification is hidden by user.

Declaration
C#
Copy
public AppControl HiddenByUserAction { get; set; }
Property Value
Type Description
AppControl
Remarks

If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by user. The property is only reflected on Tizen TV. If you use this API on other profile, this action have no effect

See Also
API Level: 4
View Source

IsAutoRemove

Gets or sets a value indicating whether the active notification is removed automatically. Default value is true.

Declaration
C#
Copy
public bool IsAutoRemove { get; set; }
Property Value
Type Description
Boolean
Remarks

IsAutoRemove option lets the active notification to be removed several seconds after it shows. When 'IsAutoRemove' is set as false, the active notification will not be removed as long as the user removes it or the application, which posted the active notification.

API Level: 3
View Source

ReplyAction

Gets or sets a ReplyAction to this active notification style.

Declaration
C#
Copy
public Notification.ReplyAction ReplyAction { get; set; }
Property Value
Type Description
Notification.ReplyAction
Remarks

When you add a ReplyAction to the ActiveStyle, the notification UI will show a ReplyAction with button. If you set null parameter, ReplyAction is not displayed.

Examples
Copy
ButtonAction button = new ButtonAction { Index = ButtonIndex.First, Text = "Yes" Action = new AppControl{ ApplicationId = "org.tizen.app" }; }; ReplyAction reply = new ReplyAction { ParentIndex = ButtonIndex.First; PlaceHolderText = "Please write your reply." ReplyMax = 160, Button = new ButtonAction { Text = "Yes", ImagePath = "image path" Action = new AppControl{ ApplicationId = "org.tizen.app" }; }; }; ActiveStyle active = new ActiveStyle { AutoRemove = true, BackgroundImage = "image path", ReplyAction = reply }; active.AddButtonAction(button);
API Level: 3

Methods

View Source

AddButtonAction(Notification.ButtonAction)

Method to add a button to the active notification style. Buttons are displayed on the notification.

Declaration
C#
Copy
public void AddButtonAction(Notification.ButtonAction button)
Parameters
Type Name Description
Notification.ButtonAction button

A ButtonAction for appear to the notification.

Remarks

If you add button that has same index, the button is replaced to latest adding button. If you don't set an index on ButtonAction, the index is set sequentially from zero.

Examples
Copy
ButtonAction button = new ButtonAction { Index = 0, Text = "Yes" Action = new AppControl{ ApplicationId = "org.tizen.app" }; }; ActiveStyle active = new ActiveStyle { IsAutoRemove = true, BackgroundImage = "image path", }; active.AddButtonAction(button);
Exceptions
Type Condition
System.ArgumentException

Thrown when an argument is invalid.

API Level: 3
View Source

GetButtonAction(ButtonIndex)

Gets the ButtonAction of the active notification.

Declaration
C#
Copy
public Notification.ButtonAction GetButtonAction(ButtonIndex index)
Parameters
Type Name Description
ButtonIndex index

The index to get a button you already added.

Returns
Type Description
Notification.ButtonAction

The ButtonAction object, which you already added.

Exceptions
Type Condition
System.ArgumentException

Thrown when an argument is invalid.

API Level: 3
View Source

GetRemoveTime(out Int32, out Int32)

Method to get time set to hide or delete notification.

Declaration
C#
Copy
public void GetRemoveTime(out int hideTime, out int deleteTime)
Parameters
Type Name Description
Int32 hideTime

The value in seconds when the notification can be hidden from the notification viewer after notification is posted.

Int32 deleteTime

The value in seconds when the notification can be deleted from the notification list in setting application after notification is posted.

API Level: 3
View Source

RemoveButtonAction(ButtonIndex)

Removes the ButtonAction you already added.

Declaration
C#
Copy
public bool RemoveButtonAction(ButtonIndex index)
Parameters
Type Name Description
ButtonIndex index

The index to remove a button.

Returns
Type Description
Boolean

true if the element is successfully found and removed; otherwise, false.

API Level: 3
View Source

SetRemoveTime(Int32, Int32)

Method to set time to hide or delete notification.

Declaration
C#
Copy
public void SetRemoveTime(int hideTime, int deleteTime)
Parameters
Type Name Description
Int32 hideTime

The value in seconds when the notification can be hidden from the notification viewer after the notification is posted.

Int32 deleteTime

The value in seconds when the notification can be deleted from the notification list in setting application after notification is posted.

Remarks

The time settings for hiding and deleting are only reflected on the Tizen TV. If you use this API on other profile, this time settings have no effect.

Exceptions
Type Condition
System.ArgumentException

Thrown when argument is invalid.

API Level: 3