[DllImport(Libraries.AppControl, EntryPoint = "app_control_send_launch_request_async")]
internal static extern ErrorCode SendLaunchRequestAsync(SafeAppControlHandle handle, ResultCallback resultCallback, ReplyCallback replyCallback, IntPtr userData);
+
+ [DllImport(Libraries.AppControl, EntryPoint = "app_control_set_component_id")]
+ internal static extern ErrorCode SetComponentId(SafeAppControlHandle handle, string componentId);
+
+ [DllImport(Libraries.AppControl, EntryPoint = "app_control_get_component_id")]
+ internal static extern ErrorCode GetComponentId(SafeAppControlHandle handle, out string componentId);
}
}
private string _category = null;
private string _applicationId = null;
private ExtraDataCollection _extraData = null;
+ private string _componentId = null;
/// <summary>
/// Initializes the instance of the AppControl class.
}
}
+ /// <summary>
+ /// Gets and sets the component ID to explicitly launch a component.
+ /// </summary>
+ /// <value>
+ /// (if the component ID is null for setter, it clears the previous value.)
+ /// From Tizen 5.5, a new application model is supported that is component-based application.
+ /// This property is for launching component-based application. If it's not set, the main component of component-based application will be launched.
+ /// If the target app is not component-based application, setting property is meaningless.
+ /// </value>
+ /// <example>
+ /// <code>
+ /// AppControl appControl = new AppControl();
+ /// appControl.ApplicationId = "org.tizen.component-based-app"; // component-based application
+ /// appControl.ComponentId = "org.tizen.frame-component";
+ /// AppControl.SendLaunchRequest(appControl);
+ /// </code>
+ /// </example>
+ /// <since_tizen> 6 </since_tizen>
+ public string ComponentId
+ {
+ get
+ {
+ if (String.IsNullOrEmpty(_componentId))
+ {
+ Interop.AppControl.ErrorCode err = Interop.AppControl.GetComponentId(_handle, out _componentId);
+ if (err != Interop.AppControl.ErrorCode.None)
+ {
+ Log.Warn(LogTag, "Failed to get the component id from the AppControl. Err = " + err);
+ }
+ }
+ return _componentId;
+ }
+ set
+ {
+ Interop.AppControl.ErrorCode err = Interop.AppControl.SetComponentId(_handle, value);
+ if (err == Interop.AppControl.ErrorCode.None)
+ {
+ _componentId = value;
+ }
+ else
+ {
+ Log.Warn(LogTag, "Failed to set the component id to the AppControl. Err = " + err);
+ }
+ }
+ }
+
#endregion // Public Properties
/// <summary>