namespace LibTVRefCommonTizen.Ports
{
+ /// <summary>
+ /// This class is for AppControl API
+ /// </summary>
public class AppControlPort : IAppControl
{
+ /// <summary>
+ /// The app ID of TV reference home application
+ /// </summary>
// TODO : change application later
public static string TVHomeAppID = "org.tizen.example.TVHome.TizenTV";
+
+ /// <summary>
+ /// The app ID of TV reference apps-tray application
+ /// </summary>
public static string TVAppsAppID = "org.tizen.example.TVApps.TizenTV";
+ /// <summary>
+ /// This operation is sended from TVHomes to TVApps
+ /// </summary>
public static string AddAppOperation = "http://xahome.tizen.org/appcontrol/operation/add_app";
+
+ /// <summary>
+ /// This operation is sended from TVApps to TVHome
+ /// </summary>
public static string AppAddedNotifyOperation = "http://xahome.tizen.org/appcontrol/operation/app_added";
public static string KeyAddedAppID = "AddedAppID";
- public void SendLaunchRequest(string PkgID)
+ /// <summary>
+ /// Sends the launch request
+ /// </summary>
+ /// <param name="AppId"> The app ID to explicitly launch</param>
+ public void SendLaunchRequest(string AppId)
{
- AppControl appControl = new AppControl();
-
- if (PkgID != null)
+ try
{
- appControl.ApplicationId = PkgID;
+ AppControl appControl = new AppControl();
+
+ if (AppId == null || AppId.Length <= 0)
+ {
+ DebuggingUtils.Err("The AppID is null or black");
+ return;
+ }
+
+ appControl.ApplicationId = AppId;
+
+ AppControl.SendLaunchRequest(appControl);
}
- else
+ catch (InvalidOperationException)
{
- appControl.ApplicationId = "org.tizen.settings";
+ DebuggingUtils.Err("Failed to create AppControl");
}
-
- AppControl.SendLaunchRequest(appControl);
}
+ /// <summary>
+ /// Sends the 'Add PIN apps' operation to TV Apps
+ /// </summary>
public void SendAddAppRequestToApps()
{
AppControl appControl = new AppControl()
AppControl.SendLaunchRequest(appControl);
}
+ /// <summary>
+ /// Sends the pinned app ID to TV Home
+ /// </summary>
+ /// <param name="addedAddID">The app ID to add PIN list int the TV Home</param>
public void SendAppAddedNotificationToHome(string addedAddID)
{
AppControl appControl = new AppControl()