From 4a98d0f3dfaefda18925156b496356abbb3b5c30 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 4 Aug 2017 11:59:52 +0900 Subject: [PATCH] Add a new API to resume the running application Change-Id: Ie8340df1d5284a21524c352fe2fc773c4b9194f8 Signed-off-by: Hwankyu Jhun --- .../ApplicationRunningContext.cs | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs index 0220424..5438a56 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs @@ -245,6 +245,30 @@ namespace Tizen.Applications } /// + /// Resumes the running application. + /// + /// Thrown when failed of invalid argument. + /// Thrown when failed because of permission denied. + /// Thrown when failed because of system error. + /// http://tizen.org/privilege/appmanager.launch + public void Resume() + { + err = Interop.ApplicationManager.AppManagerResumeApp(_contextHandle); + if (err != Interop.ApplicationManager.ErrorCode.None) + { + switch (err) + { + case Interop.ApplicationManager.ErrorCode.InvalidParameter: + throw new ArgumentException("Invalid argument."); + case Interop.ApplicationManager.ErrorCode.PermissionDenied: + throw new UnauthorizedAccessException("Permission denied."); + default: + throw new InvalidOperationException("Invalid Operation."); + } + } + } + + /// /// Releases all resources used by the ApplicationRunningContext class. /// public void Dispose() @@ -266,4 +290,4 @@ namespace Tizen.Applications _disposed = true; } } -} \ No newline at end of file +} -- 2.7.4