Class ApplicationRunningContext

    Definition

    Namespace:
    Tizen.Applications
    Assembly:
    Tizen.Applications.Common.dll

    This class provides methods and properties to retrieve information about the currently running application context.

    public class ApplicationRunningContext : IDisposable
    Inheritance
    object
    ApplicationRunningContext
    Implements
    System.IDisposable
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    Constructors

    View Source

    ApplicationRunningContext(string)

    Constructs an ApplicationRunningContext object from the specified application ID.

    Declaration
    public ApplicationRunningContext(string applicationId)
    Parameters
    Type Name Description
    string applicationId

    The ID of the application.

    Remarks

    The constructor creates a new instance of the ApplicationRunningContext class by passing in the application ID. It throws exceptions if any errors occur during initialization, such as invalid arguments, non-existent applications, system errors, or out of memory conditions.

    Examples

    Here's an example demonstrating how to construct an ApplicationRunningContext object using the constructor:

    // Define the application ID
    const string APP_ID = "org.example.app";
    
    // Instantiate the ApplicationRunningContext class with the application ID
    var context = new ApplicationRunningContext(APP_ID);

    Properties

    View Source

    ApplicationId

    Gets the application ID.

    Declaration
    public string ApplicationId { get; }
    Property Value
    Type Description
    string
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    IsSubApp

    Gets whether the application is sub application of the application group.

    Declaration
    public bool IsSubApp { get; }
    Property Value
    Type Description
    bool
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    IsTerminated

    Gets whether the application is terminated.

    Declaration
    public bool IsTerminated { get; }
    Property Value
    Type Description
    bool
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    PackageId

    Gets the package ID of the application.

    Declaration
    public string PackageId { get; }
    Property Value
    Type Description
    string
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    ProcessId

    Gets the application's process ID.

    Declaration
    public int ProcessId { get; }
    Property Value
    Type Description
    int
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    State

    Gets the state of the application.

    Declaration
    public ApplicationRunningContext.AppState State { get; }
    Property Value
    Type Description
    ApplicationRunningContext.AppState
    Remarks

    Note that application's state might be changed after you get app_context. This API just returns the state of application when you get the app_context.

    Methods

    View Source

    Dispose()

    Releases all resources used by the ApplicationRunningContext class.

    Declaration
    public void Dispose()
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    ~ApplicationRunningContext()

    Destroys the current application running context.

    Declaration
    protected ~ApplicationRunningContext()
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    View Source

    Resume()

    Resumes the running application.

    Declaration
    public void Resume()
    Remarks

    The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. It also offers functionality to check if the current application is in foreground or background mode.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown when failed of invalid argument.

    System.UnauthorizedAccessException

    Thrown when failed because of permission denied.

    System.InvalidOperationException

    Thrown when failed because of system error.

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX