Class ComplicationProviderSetup
Definition
- Namespace:
- Tizen.Applications.WatchfaceComplication
- Assembly:
- Tizen.Applications.WatchfaceComplication.dll
- API Level:
- 6
Represents the complication setup for a setup application.
public static class ComplicationProviderSetup
- Inheritance
-
ComplicationProviderSetup
Methods
View SourceGetContext(ReceivedAppControl)
Gets complication's setup context.
Declaration
public static Bundle GetContext(ReceivedAppControl recvAppCtrl)
Parameters
Type | Name | Description |
---|---|---|
ReceivedAppControl | recvAppCtrl | The received appcontrol. |
Returns
Type | Description |
---|---|
Bundle | The setup context. |
Examples
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 |
---|---|
ArgumentException | Thrown when e is invalid. |
InvalidOperationException | Thrown when the method failed due to invalid operation. |
NotSupportedException | Thrown when the watchface complication is not supported. |
API Level: 6
View SourceIsEditing(ReceivedAppControl)
Gets the received appcontrol containing information about edit.
Declaration
public static bool IsEditing(ReceivedAppControl recvAppCtrl)
Parameters
Type | Name | Description |
---|---|---|
ReceivedAppControl | recvAppCtrl | The received appcontrol. |
Returns
Type | Description |
---|---|
Boolean | The boolean value. |
Examples
protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
{
if (ComplicationProviderSetup.IsEditing(e.ReceivedAppControl))
{
// do something
}
base.OnAppControlReceived(e);
}
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when e is invalid. |
InvalidOperationException | Thrown when the method failed due to invalid operation. |
NotSupportedException | Thrown when the watchface complication is not supported. |
API Level: 6
View SourceReplyToEditor(ReceivedAppControl, Bundle)
Replies the setup context to the editor
Declaration
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
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 |
---|---|
ArgumentException | Thrown when e is invalid. |
InvalidOperationException | Thrown when the method failed due to invalid operation. |
NotSupportedException | Thrown when the watchface complication is not supported. |
UnauthorizedAccessException | Thrown when the application does not have privilege to access this method. |