Class ComplicationProviderSetup

Definition

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

Represents the complication setup for a setup application.

C#
Copy
public static class ComplicationProviderSetup
Inheritance
System.Object
ComplicationProviderSetup

Methods

View Source

GetContext(ReceivedAppControl)

Gets complication's setup context.

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

The received appcontrol.

Returns
Type Description
Bundle

The setup context.

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { if (ComplicationProviderSetup.IsEditing(e.ReceivedAppControl)) { Bundle context = ComplicationProviderSetup.GetContext(e.ReceivedAppControl); context.AddItem("TEST_KEY", "NEW CONTEXT"); ComplicationProviderSetup.ReplyToEditor(e.ReceivedAppControl, context); } base.OnAppControlReceived(e); }
Exceptions
Type Condition
System.ArgumentException

Thrown when e is invalid.

System.InvalidOperationException

Thrown when the method failed due to invalid operation.

System.NotSupportedException

Thrown when the watchface complication is not supported.

API Level: 6
View Source

IsEditing(ReceivedAppControl)

Gets the received appcontrol containing information about edit.

Declaration
C#
Copy
public static bool IsEditing(ReceivedAppControl recvAppCtrl)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Returns
Type Description
Boolean

The boolean value.

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { if (ComplicationProviderSetup.IsEditing(e.ReceivedAppControl)) { // do something } base.OnAppControlReceived(e); }
Exceptions
Type Condition
System.ArgumentException

Thrown when e is invalid.

System.InvalidOperationException

Thrown when the method failed due to invalid operation.

System.NotSupportedException

Thrown when the watchface complication is not supported.

API Level: 6
View Source

ReplyToEditor(ReceivedAppControl, Bundle)

Replies the setup context to the editor

Declaration
C#
Copy
public static void ReplyToEditor(ReceivedAppControl recvAppCtrl, Bundle context)
Parameters
Type Name Description
ReceivedAppControl recvAppCtrl

The received appcontrol.

Bundle context

The context created by complication setup app.

Examples
Copy
protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { if (ComplicationProviderSetup.IsEditing(e.ReceivedAppControl)) { Bundle context = ComplicationProviderSetup.GetContext(e.ReceivedAppControl); context.AddItem("TEST_KEY", "NEW CONTEXT"); ComplicationProviderSetup.ReplyToEditor(e.ReceivedAppControl, context); } base.OnAppControlReceived(e); }
Exceptions
Type Condition
System.ArgumentException

Thrown when e is invalid.

System.InvalidOperationException

Thrown when the method failed due to invalid operation.

System.NotSupportedException

Thrown when the watchface complication is not supported.

UnauthorizedAccessException

Thrown when the application does not have privilege to access this method.

API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing