Class ComplicationProviderSetup
Definition
- Namespace:
- Tizen.Applications.WatchfaceComplication
- Assembly:
- Tizen.Applications.WatchfaceComplication.dll
Represents the complication setup for a setup application.
public static class ComplicationProviderSetup
- Inheritance
-
objectComplicationProviderSetup
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 |
---|---|
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. |
IsEditing(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 |
---|---|
bool | The boolean value. |
Examples
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. |
ReplyToEditor(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 |
---|---|
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. |
System.UnauthorizedAccessException | Thrown when the application does not have privilege to access this method. |