Show / Hide Table of Contents

    Class ReceivedAppControl

    Definition

    Namespace:
    Tizen.Applications
    Assembly:
    Tizen.Applications.Common.dll
    API Level:
    3

    Represents the received AppControl.

    public class ReceivedAppControl : AppControl
    Inheritance
    Object
    AppControl
    ReceivedAppControl
    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 Source

    ReceivedAppControl(SafeAppControlHandle)

    Initializes a ReceivedAppControl class.

    Declaration
    public ReceivedAppControl(SafeAppControlHandle handle)
    Parameters
    Type Name Description
    SafeAppControlHandle handle

    App control handle

    API Level: 3

    Properties

    View Source

    CallerApplicationId

    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;
        }
    API Level: 3
    View Source

    IsReplyRequest

    Checks whether the caller is requesting a reply from the launch request.

    Declaration
    public bool IsReplyRequest { get; }
    Property Value
    Type Description
    Boolean

    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;
        }
    API Level: 3

    Methods

    View Source

    ReplyToLaunchRequest(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);
            }
        }
    API Level: 3
    • View Source
    Back to top Copyright © 2016-2022 Samsung
    Generated by DocFX