--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 15\r
+VisualStudioVersion = 15.0.28010.2050\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reply", "Reply\Reply.csproj", "{7ABD6289-AA0F-4268-A633-8B54C1759E4D}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {7ABD6289-AA0F-4268-A633-8B54C1759E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {7ABD6289-AA0F-4268-A633-8B54C1759E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {7ABD6289-AA0F-4268-A633-8B54C1759E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {7ABD6289-AA0F-4268-A633-8B54C1759E4D}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ SolutionGuid = {297EF507-9B6A-48C8-BCA8-700F28D05D7D}\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+using System;\r
+using Tizen;\r
+using Tizen.Applications;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+\r
+namespace Reply\r
+{\r
+ class Program : NUIApplication\r
+ {\r
+ static private string LogTag = "Reply";\r
+\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+ Initialize();\r
+ Log.Info(LogTag, "OnCreate()");\r
+ }\r
+\r
+ protected override void OnAppControlReceived(AppControlReceivedEventArgs e)\r
+ {\r
+ base.OnAppControlReceived(e);\r
+ Log.Info(LogTag, "OnAppControlReceived()");\r
+ if (e.ReceivedAppControl.IsReplyRequest == true)\r
+ {\r
+ AppControl replyRequest = new AppControl();\r
+ e.ReceivedAppControl.ReplyToLaunchRequest(replyRequest, AppControlReplyResult.Succeeded);\r
+ Log.Info(LogTag, "ReplyToLaunchRequest()");\r
+ }\r
+ }\r
+\r
+ protected override void OnResume()\r
+ {\r
+ base.OnResume();\r
+ Log.Info(LogTag, "OnResume()");\r
+ }\r
+\r
+ protected override void OnPause()\r
+ {\r
+ base.OnPause();\r
+ Log.Info(LogTag, "OnPause()");\r
+ }\r
+\r
+ protected override void OnTerminate()\r
+ {\r
+ base.OnTerminate();\r
+ Log.Info(LogTag, "OnTerminte()");\r
+ }\r
+\r
+ void Initialize()\r
+ {\r
+ Window.Instance.KeyEvent += OnKeyEvent;\r
+\r
+ TextLabel text = new TextLabel("Hello Tizen NUI World");\r
+ text.HorizontalAlignment = HorizontalAlignment.Center;\r
+ text.VerticalAlignment = VerticalAlignment.Center;\r
+ text.TextColor = Color.Blue;\r
+ text.PointSize = 12.0f;\r
+ text.HeightResizePolicy = ResizePolicyType.FillToParent;\r
+ text.WidthResizePolicy = ResizePolicyType.FillToParent;\r
+ Window.Instance.GetDefaultLayer().Add(text);\r
+\r
+ Animation animation = new Animation(2000);\r
+ animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);\r
+ animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);\r
+ animation.Looping = true;\r
+ animation.Play();\r
+ }\r
+\r
+ public void OnKeyEvent(object sender, Window.KeyEventArgs e)\r
+ {\r
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))\r
+ {\r
+ Exit();\r
+ }\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ var app = new Program();\r
+ app.Run(args);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>netcoreapp2.0</TargetFramework>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="lib\"/>\r
+ <Folder Include="res\"/>\r
+ </ItemGroup>\r
+\r
+ <ItemGroup>\r
+ <PackageReference Include="Tizen.NET" Version="5.0.0.14562" >\r
+ <ExcludeAssets>Runtime</ExcludeAssets>\r
+ </PackageReference>\r
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.1" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5" package="org.tizen.example.Reply" version="1.0.0">\r
+ <profile name="common" />\r
+ <ui-application appid="org.tizen.example.Reply"\r
+ exec="Reply.dll"\r
+ type="dotnet"\r
+ multiple="false"\r
+ taskmanage="true"\r
+ nodisplay="false"\r
+ launch_mode="single">\r
+ <label>Reply</label>\r
+ <icon>Reply.png</icon>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ </ui-application>\r
+</manifest>\r
private const string MyAppId1 = "org.tizen.SampleServiceApp2.Tizen";
private const string MyUIAppId = "org.tizen.example.UIApp.Tizen";
private static bool _flag;
+ private static bool _replyFlag = false;
[SetUp]
public static void Init()
AppControl MyAppControl = new AppControl();
Assert.Throws<ArgumentException>(() => Tizen.Applications.AppControl.SendTerminateRequest(MyAppControl));
}
+
+ static void ReplyReceivedCallback(Tizen.Applications.AppControl launchRequest, Tizen.Applications.AppControl replyRequest, AppControlReplyResult result)
+ {
+ if (result == AppControlReplyResult.Succeeded)
+ _replyFlag = true;
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test : Send Launch Request Asynchronously - UI app should be launched")]
+ [Property("SPEC", "Tizen.Applications.AppControl.SendLaunchRequestAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Hwankyu Jhun, h.jhun@samsung.com")]
+ [Property("COVPARAM", "Tizen.Applications.AppControl, Tizen.Applications.AppControlReplyCallback")]
+ public async Task SendLaunchRequestAsync_TO_UI_APP()
+ {
+
+ /* PRECONDITION
+ * Install org.tizen.example.Reply.tpk <in folder res/>
+ * Privilege: http://tizen.org/privilege/appmanager.launch
+ * */
+
+ /* TEST CODE */
+ bool isRunning = false;
+ string appId = "org.tizen.example.Reply";
+
+ _appControl = new Tizen.Applications.AppControl();
+ Assert.IsNotNull(_appControl, "Object should not be null after initializing");
+
+ _appControl.Operation = AppControlOperations.Default;
+ _appControl.ApplicationId = appId;
+
+ AppControlResult result = await Tizen.Applications.AppControl.SendLaunchRequestAsync(_appControl, ReplyReceivedCallback);
+ Assert.AreEqual(result, AppControlResult.None, "The result should be None.");
+ _runningApps = ApplicationManager.GetRunningApplicationsAsync();
+ _list = await _runningApps;
+ foreach (var app in _list)
+ {
+ if (app.ApplicationId == appId)
+ isRunning = true;
+ }
+ Assert.IsTrue(isRunning, appId + " should be running after launching request has sent");
+
+ await Task.Delay(5000);
+ Assert.IsTrue (_replyFlag, " The flag should be true");
+ }
}
}