Class NUIGadgetManager

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.Gadget.dll

    The NUIGadgetManager provides methods and events related to managing gadgets in the NUI.

    public static class NUIGadgetManager
    Inheritance
    object
    NUIGadgetManager

    Methods

    View Source

    Add(string, string, bool)

    Adds a NUIGadget to the NUIGadgetManager.

    Declaration
    public static NUIGadget Add(string resourceType, string className, bool useDefaultContext)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package.

    string className

    The class name of the NUIGadget.

    bool useDefaultContext

    The flag it true, use a default context. Otherwise, use a new load context.

    Returns
    Type Description
    NUIGadget

    The NUIGadget object.

    Remarks

    To use Unload() method, the useDefaultContext must be'false'.

    View Source

    Add(string, string)

    Adds a NUIGadget to the NUIGadgetManager.

    Declaration
    public static NUIGadget Add(string resourceType, string className)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package.

    string className

    The class name of the NUIGadget.

    Returns
    Type Description
    NUIGadget

    The NUIGadget object.

    View Source

    Create(NUIGadget, bool)

    Executes the creation process of the NUIGadget.

    Declaration
    public static void Create(NUIGadget gadget, bool useIdler)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object to perform the creation process.

    bool useIdler

    whether to use idler

    Remarks

    This method basically works with sync. If you want to operate with async, put true in the 'useIdler' parameter and use it.

    View Source

    Create(NUIGadget)

    Executes the creation process of the NUIGadget.

    Declaration
    public static void Create(NUIGadget gadget)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object to perform the creation process.

    Remarks

    This method basically works with sync.

    View Source

    CreateInstance(string, string, bool)

    Creates a new NUIGadget instance.

    Declaration
    public static NUIGadget CreateInstance(string resourceType, string className, bool useDefaultContext)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package.

    string className

    The class name of the NUIGadget.

    bool useDefaultContext

    The flag it true, use a default context. Otherwise, use a new load context.

    Returns
    Type Description
    NUIGadget

    The NUIGadget object.

    Remarks

    To use Unload() method, the useDefaultContext must be'false'.

    View Source

    GetGadgetInfos()

    Retrieves information about available NUIGadgets.

    Declaration
    public static IEnumerable<NUIGadgetInfo> GetGadgetInfos()
    Returns
    Type Description
    IEnumerable<><NUIGadgetInfo>

    An enumerable list of NUIGadgetInfo objects.

    Remarks

    This method provides details on gadgets that are currently accessible rather than listing all installed gadgets. A NUIGadget's resource package may specify which applications have access through the "allowed-packages" setting. During execution, the platform mounts the resource package in the application's resources directory.

    View Source

    GetGadgets()

    Retrieves the instances of currently running NUIGadgets.

    Declaration
    public static IEnumerable<NUIGadget> GetGadgets()
    Returns
    Type Description
    IEnumerable<><NUIGadget>

    An enumerable list containing all the active NUIGadgets.

    View Source

    Load(string, bool)

    Loads an assembly of the NUIGadget.

    Declaration
    public static void Load(string resourceType, bool useDefaultContext)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package.

    bool useDefaultContext

    Indicates whether to use a default load context or not.

    View Source

    Load(string)

    Loads an assembly of the NUIGadget.

    Declaration
    public static void Load(string resourceType)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package.

    Remarks

    This method loads an assembly of the NUIGadget based on the specified resource type. It throws an ArgumentException if the argument is invalid, or an InvalidOperationException if the operation fails due to any reason.

    View Source

    Pause(NUIGadget, bool)

    Pauses the execution of the specified NUIGadget.

    Declaration
    public static void Pause(NUIGadget gadget, bool useIdler)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object whose execution needs to be paused.

    bool useIdler

    whether to use idler

    Remarks

    Calling this method pauses the currently executing NUIGadget. It does not affect any other gadgets that may be running simultaneously. And, this method basically works with async. If you want to operate with sync, put false in the 'useIdler' parameter and use it.

    View Source

    Pause(NUIGadget)

    Pauses the execution of the specified NUIGadget.

    Declaration
    public static void Pause(NUIGadget gadget)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object whose execution needs to be paused.

    Remarks

    Calling this method pauses the currently executing NUIGadget. It does not affect any other gadgets that may be running simultaneously. And, this method basically works with async.

    View Source

    PreCreate(NUIGadget, bool)

    Executes the pre-creation process of the NUIGadget.

    Declaration
    public static void PreCreate(NUIGadget gadget, bool useIdler)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object to perform the pre-creation process.

    bool useIdler

    whether to use idler

    Remarks

    This method basically works with sync. If you want to operate with async, put true in the 'useIdler' parameter and use it.

    View Source

    PreCreate(NUIGadget)

    Executes the pre-creation process of the NUIGadget.

    Declaration
    public static void PreCreate(NUIGadget gadget)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object to perform the pre-creation process.

    Remarks

    This method basically works with sync.

    View Source

    Refresh()

    Refresh gadget mount and update information in NUIGadgetManager.

    Declaration
    public static void Refresh()
    Remarks

    To use this method properly, All the gadgets should be unloaded in advance.

    View Source

    Remove(NUIGadget, bool)

    Removes the specified NUIGadget from the NUIGadgetManager.

    Declaration
    public static void Remove(NUIGadget gadget, bool useIdler)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object that needs to be removed.

    bool useIdler

    whether to use idler

    Remarks

    This method allows you to remove a specific NUIGadget from the NUIGadgetManager. By passing the NUIGadget object as an argument, you can ensure that only the desired gadget is removed. It is important to note that once a gadget is removed, any references to it become invalid. Therefore, it is crucial to handle the removal process carefully to avoid any potential issues. And, this method basically works with async. If you want to operate with sync, put false in the 'useIdler' parameter and use it.

    View Source

    Remove(NUIGadget)

    Removes the specified NUIGadget from the NUIGadgetManager.

    Declaration
    public static void Remove(NUIGadget gadget)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object that needs to be removed.

    Remarks

    This method allows you to remove a specific NUIGadget from the NUIGadgetManager. By passing the NUIGadget object as an argument, you can ensure that only the desired gadget is removed. It is important to note that once a gadget is removed, any references to it become invalid. Therefore, it is crucial to handle the removal process carefully to avoid any potential issues. And, this method basically works with async.

    View Source

    RemoveAll()

    Removes all NUIGadgets from the NUIGadgetManager.

    Declaration
    public static void RemoveAll()
    Remarks

    This method is called to remove all NUIGadgets that are currently registered in the NUIGadgetManager. It ensures that no more NUIGadgets exist after calling this method. And, this method basically works with async.

    View Source

    RemoveAll(bool)

    Removes all NUIGadgets from the NUIGadgetManager.

    Declaration
    public static void RemoveAll(bool useIdler)
    Parameters
    Type Name Description
    bool useIdler

    whether to use idler

    Remarks

    This method is called to remove all NUIGadgets that are currently registered in the NUIGadgetManager. It ensures that no more NUIGadgets exist after calling this method. And, this method basically works with async. If you want to operate with sync, put false in the 'useIdler' parameter and use it.

    View Source

    Resume(NUIGadget, bool)

    Resumes the execution of the specified NUIGadget.

    Declaration
    public static void Resume(NUIGadget gadget, bool useIdler)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object whose execution needs to be resumed.

    bool useIdler

    whether to use idler

    Remarks

    By calling this method, you can resume the execution of the currently suspended NUIGadget. It takes the NUIGadget object as an argument which represents the target gadget that needs to be resumed. And, this method basically works with async. If you want to operate with sync, put false in the 'useIdler' parameter and use it.

    View Source

    Resume(NUIGadget)

    Resumes the execution of the specified NUIGadget.

    Declaration
    public static void Resume(NUIGadget gadget)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object whose execution needs to be resumed.

    Remarks

    By calling this method, you can resume the execution of the currently suspended NUIGadget. It takes the NUIGadget object as an argument which represents the target gadget that needs to be resumed. And, this method basically works with async.

    View Source

    SendAppControl(NUIGadget, AppControl)

    Sends the specified application control to the currently running NUIGadget.

    Declaration
    public static void SendAppControl(NUIGadget gadget, AppControl appControl)
    Parameters
    Type Name Description
    NUIGadget gadget

    The NUIGadget object that will receive the app control.

    AppControl appControl

    The app control object containing the desired arguments and actions.

    View Source

    SendMessage(Bundle)

    Sends the message to the NUIGadgetManager.

    Declaration
    public static void SendMessage(Bundle message)
    Parameters
    Type Name Description
    Bundle message

    The message

    View Source

    Unload(string)

    Unloads the specified NUIGadget assembly from memory.

    Declaration
    public static void Unload(string resourceType)
    Parameters
    Type Name Description
    string resourceType

    The resource type of the NUIGadget package to unload.

    Remarks

    To use this method properly, the assembly of the gadget must be loaded using Load() with the custom context.

    Examples
    /// Load an assembly of the NUIGadget.
    NUIGadgetManager.Load("org.tizen.appfw.gadget.NetworkSetting", false);
    /// NUIGadgetManager.Add("org.tizen.appfw.gadget.NetworkSetting", "NetworkSettingGadget", false);
    
    /// Unload the loaded assembly
    NUIGadgetManager.Unload("org.tizen.appfw.gadget.NetworkSetting");

    Events

    View Source

    NUIGadgetLifecycleChanged

    Occurs when the lifecycle of the NUIGadget is changed.

    Declaration
    public static event EventHandler<NUIGadgetLifecycleChangedEventArgs> NUIGadgetLifecycleChanged
    Event Type
    Type Description
    EventHandler<><NUIGadgetLifecycleChangedEventArgs>
    Remarks

    This event is raised when the state of the NUIGadget changes. It provides information about the current state through the NUIGadgetLifecycleChangedEventArgs argument.

    View Source

    NUIGadgetMessageReceived

    Occurs when the message is received.

    Declaration
    public static event EventHandler<NUIGadgetMessageReceivedEventArgs> NUIGadgetMessageReceived
    Event Type
    Type Description
    EventHandler<><NUIGadgetMessageReceivedEventArgs>
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX