Class ComplicationProvider

Definition

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

Represents the complication provider for a service application.

C#
Copy
public abstract class ComplicationProvider : IDisposable
Inheritance
ComplicationProvider

Constructors

View Source

ComplicationProvider(String)

Initializes a new instance of the ComplicationProvider class.

Declaration
C#
Copy
protected ComplicationProvider(string providerId)
Parameters
Type Name Description
String providerId

The id of the complication provider.

Examples
Copy
public class MyComplicationProvider : ComplicationProvider { public MyComplicationProvider(string providerId) : base(providerId) { } protected override void OnDataUpdateRequested(string reqestAppId, ComplicationTypes type, Bundle contextData) { } }
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing

Properties

View Source

Id

Gets the provider ID.

Declaration
C#
Copy
public string Id { get; }
Property Value
Type Description
String
API Level: 6

Methods

View Source

Dispose()

Releases all resources used by the ComplicationProvider class.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the unmanaged resources used by the ComplicationProvider instance specifying whether to perform a normal dispose operation.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true for a normal dispose operation; false to finalize the handle.

API Level: 3
View Source

Finalize()

Destructor of the provider class.

Declaration
C#
Copy
protected void Finalize()
View Source

GetEventComplicationType(ReceivedAppControl)

Gets the complication type of the received appcontrol.

Declaration
C#
Copy
public static ComplicationTypes GetEventComplicationType(ReceivedAppControl recvAppCtrl)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Returns
Type Description
ComplicationTypes

The target complication type of received event

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { ComplicationTypes type = ComplicationProvider.GetEventComplicationType(e.ReceivedAppControl); base.OnAppControlReceived(e); }
API Level: 6
View Source

GetEventContext(ReceivedAppControl)

Gets the complication context of appcontrol that raises the event.

Declaration
C#
Copy
public static Bundle GetEventContext(ReceivedAppControl recvAppCtrl)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Returns
Type Description
Bundle

The context of received event

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { Bundle context = ComplicationProvider.GetEventContext(e.ReceivedAppControl); base.OnAppControlReceived(e); }
API Level: 6
View Source

GetEventProviderId(ReceivedAppControl)

Gets the provider ID of appcontrol that raises the event.

Declaration
C#
Copy
public static string GetEventProviderId(ReceivedAppControl recvAppCtrl)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Returns
Type Description
String

The target provider ID of received event

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { string providerId = ComplicationProvider.GetEventProviderId(e.ReceivedAppControl); base.OnAppControlReceived(e); }
API Level: 6
View Source

GetEventType(ReceivedAppControl)

Gets the received event type.

Declaration
C#
Copy
public static EventTypes GetEventType(ReceivedAppControl recvAppCtrl)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Returns
Type Description
EventTypes

The type of received event

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { EventTypes type = ComplicationProvider.GetEventType(e.ReceivedAppControl); if (type == EventTypes.EventDoubleTap) { // do something } base.OnAppControlReceived(e); }
API Level: 6
View Source

NotifyUpdate()

Emits the update event for complications.

Declaration
C#
Copy
public void NotifyUpdate()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing
View Source

OnDataUpdateRequested(String, ComplicationTypes, Bundle)

Overrides this method to handle the behavior when the event for requesting the update of complication data comes from watchface complication.

Declaration
C#
Copy
protected abstract ComplicationData OnDataUpdateRequested(string reqestAppId, ComplicationTypes type, Bundle contextData)
Parameters
Type Name Description
String reqestAppId

The ID of application which sent update request.

ComplicationTypes type

The requested type.

Bundle contextData

The complication's context which is set by complication setup application.

Returns
Type Description
ComplicationData

The requested ComplicationData

API Level: 6

Extension Methods