Class ComplicationProviderSetup
Definition
- Namespace:
- Tizen.Applications.WatchfaceComplication
- Assembly:
- Tizen.Applications.WatchfaceComplication.dll
- API Level:
- 6
Represents the complication setup for a setup application.
C#Copypublic static class ComplicationProviderSetup
- Inheritance
-
System.ObjectComplicationProviderSetup
Methods
Declaration
C#Copypublic static Bundle GetContext(ReceivedAppControl recvAppCtrl)
Parameters
Type | Name | Description |
---|---|---|
ReceivedAppControl | recvAppCtrl | The received appcontrol. |
Returns
Type | Description |
---|---|
Bundle | The setup context. |
Examples
Copyprotected 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
IsEditing(ReceivedAppControl)
Gets the received appcontrol containing information about edit.
Declaration
C#Copypublic static bool IsEditing(ReceivedAppControl recvAppCtrl)
Parameters
Type | Name | Description |
---|---|---|
ReceivedAppControl | recvAppCtrl | The received appcontrol. |
Returns
Type | Description |
---|---|
System.Boolean | The boolean value. |
Examples
Copyprotected 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
Declaration
C#Copypublic 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
Copyprotected 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. |