Class TimeData

Definition

Namespace:
Tizen.Applications.WatchfaceComplication
Assembly:
Tizen.Applications.WatchfaceComplication.dll
API Level:
6

Represents the time data for a complication.

C#
Copy
public class TimeData : ComplicationData
Inheritance
System.Object
TimeData

Constructors

View Source

TimeData(Int64, String, String)

Initializes the TimeData class.

Declaration
C#
Copy
public TimeData(long timestamp, string iconPath, string extraData)
Parameters
Type Name Description
System.Int64 timestamp

The timestamp value.

System.String iconPath

The icon path.

System.String extraData

The extra data.

Examples
Copy
protected override ComplicationData OnDataUpdateRequested(string reqestAppId, ComplicationTypes type, Bundle contextData) { if (type == ComplicationTypes.Time) { return new TimeData((Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds, "icon path", "extra"); } else if (type == ComplicationTypes.LongText) { return new LongTextData("longlong", "icon path", "title", null); } }
Exceptions
Type Condition
System.ArgumentException

Thrown when parameter is invalid.

API Level: 6

Properties

View Source

ExtraData

The extra data.

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

IconPath

The icon path data.

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

ScreenReaderText

The information about the screen reader text of complication data.

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

Timestamp

The information about the timestamp of complication data.

Declaration
C#
Copy
public long Timestamp { get; set; }
Property Value
Type Description
System.Int64
Exceptions
Type Condition
System.ArgumentException

Thrown when try to set invalid value.

API Level: 6