public string AppID { get; set; }
/// <summary>
- /// A file URI to be open
- /// </summary>
- public string FileUri { get; set; }
-
- /// <summary>
- /// A media id of MediaContent
- /// </summary>
- public string MediaId { get; set; }
-
- /// <summary>
/// A dictionary which has extra data for App Control
/// </summary>
- private Dictionary<string, string> extraData;
+ protected Dictionary<string, string> extraData;
/// <summary>
/// A dictionary which has extra data for App Control
public string Execute()
{
// Warn : Do NOT pass 'E'xtraData, it will create a new Dictionary and it might cause unexpected situation.
- AppControlUtils.SendLaunchRequest(AppID, extraData, FileUri);
+ AppControlUtils.SendLaunchRequest(AppID, extraData);
return "default";
}
}
*/
using System;
+using LibTVRefCommonPortable.Utils;
namespace LibTVRefCommonPortable.DataModels
{
/// <summary>
/// A Media ControlAction.
/// </summary>
- class MediaControlAction : IAction
+ class MediaControlAction : AppControlAction
{
/// <summary>
+ /// A file URI to be open
+ /// </summary>
+ public string FileUri { get; set; }
+
+ /// <summary>
/// A method execute a action.
/// </summary>
/// <returns>A next statue of a Shortcut.</returns>
- public string Execute()
+ new public string Execute()
{
- throw new NotImplementedException();
+ // Warn : Do NOT pass 'E'xtraData, it will create a new Dictionary and it might cause unexpected situation.
+ AppControlUtils.SendLaunchRequest(AppID, extraData, FileUri);
+ return "default";
}
}
}
{
Label = item.DisplayName,
IconPath = "ic_launcher_mediahub_138.png",
- Action = new AppControlAction()
+ Action = new MediaControlAction()
{
AppID = "org.tizen.xamediahub",
- MediaId = item.MediaId,
FileUri = "file://" + item.FilePath,
}
};
+ var mediaControlAction = defaultStateDescription.Action as MediaControlAction;
+
+ mediaControlAction.ExtraData.Add("View By", "All");
+ mediaControlAction.ExtraData.Add("Media type", "Video");
+ mediaControlAction.ExtraData.Add("Media Id", item.MediaId);
+
var recentShortcutInfo = new RecentShortcutInfo();
recentShortcutInfo.ScreenshotPath = item.ThumbnailPath;