Class ReceivedAppControl
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.Common.dll
Represents the received AppControl.
public class ReceivedAppControl : AppControl
- Inheritance
Examples
public class ReceivedAppControlExample : UIApplication
{
// ...
protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
{
ReceivedAppControl control = e.ReceivedAppControl;
if (control.Operation == AppControlOperations.Pick)
{
Log.Debug(LogTag, "Received AppControl is Pick");
}
if (control.IsReplyRequest)
{
AppControl replyRequest = new AppControl();
replyRequest.ExtraData.Add("myKey", "I'm replying");
control.ReplyToLaunchRequest(replyRequest, AppControlReplyResult.Succeeded);
}
}
}
Constructors
View SourceReceivedAppControl(SafeAppControlHandle)
Initializes a ReceivedAppControl class.
Declaration
public ReceivedAppControl(SafeAppControlHandle handle)
Parameters
Type | Name | Description |
---|---|---|
SafeAppControlHandle | handle | App control handle |
Properties
View SourceCallerApplicationId
Gets the application ID of the caller from the launch request.
Declaration
public string CallerApplicationId { get; }
Property Value
Type | Description |
---|---|
string | The application ID of the caller. |
Examples
protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
{
ReceivedAppControl control = e.ReceivedAppControl;
string caller = control.CallerApplicationId;
}
View Source
IsReplyRequest
Checks whether the caller is requesting a reply from the launch request.
Declaration
public bool IsReplyRequest { get; }
Property Value
Type | Description |
---|---|
bool | If true, this ReceivedAppControl is requested by the caller, otherwise false |
Examples
protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
{
ReceivedAppControl control = e.ReceivedAppControl;
bool isReply = control.IsReplyRequest;
}
Methods
View SourceReplyToLaunchRequest(AppControl, AppControlReplyResult)
Replies to the launch request sent by the caller. If the caller application sends the launch request to receive the result, the callee application can return the result back to the caller.
Declaration
public void ReplyToLaunchRequest(AppControl replyRequest, AppControlReplyResult result)
Parameters
Type | Name | Description |
---|---|---|
AppControl | replyRequest | The AppControl in which the results of the callee are contained. |
AppControlReplyResult | result | The result code of the launch request. |
Examples
protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
{
ReceivedAppControl control = e.ReceivedAppControl;
if (control.IsReplyRequest)
{
AppControl replyRequest = new AppControl();
replyRequest.ExtraData.Add("myKey", "I'm replying");
control.ReplyToLaunchRequest(replyRequest, AppControlReplyResult.Succeeded);
}
}