1 /// Copyright 2016 by Samsung Electronics, Inc.,
3 /// This software is the confidential and proprietary information
4 /// of Samsung Electronics, Inc. ("Confidential Information"). You
5 /// shall not disclose such Confidential Information and shall use
6 /// it only in accordance with the terms of the license agreement
7 /// you entered into with Samsung.
10 using System.Collections.Generic;
11 using System.Threading.Tasks;
13 namespace Tizen.Applications
16 /// ApplicationManager class. This class has the methods and events of the ApplicationManager.
18 static public class ApplicationManager
21 /// ApplicationLaunched event. This event is occurred when the application is launched.
23 static public event EventHandler<ApplicationChangedEventArgs> ApplicationLaunched
27 ApplicationManagerImpl.Instance.ApplicationLaunched += value;
31 ApplicationManagerImpl.Instance.ApplicationLaunched -= value;
36 /// ApplicationTerminated event. This event is occurred when the application is terminated.
38 static public event EventHandler<ApplicationChangedEventArgs> ApplicationTerminated
42 ApplicationManagerImpl.Instance.ApplicationTerminated += value;
46 ApplicationManagerImpl.Instance.ApplicationTerminated -= value;
51 /// GetInstalledAppsAsync asynchronous method.
53 /// <returns>It returns the InstalledApplication informations asynchronously.</returns>
54 static public Task<IEnumerable<InstalledApplication>> GetInstalledAppsAsync()
56 return ApplicationManagerImpl.Instance.GetInstalledAppsAsync();
60 /// GetInstalledAppsAsync asynchronous method.
62 /// <param name="filter">Filter is a InstalledApplicationFilter type. It consisting of a key and value pairs.</param>
63 /// <returns>It returns the filtered InstalledApplication informations asynchronously.</returns>
64 static public Task<IEnumerable<InstalledApplication>> GetInstalledAppsAsync(InstalledApplicationFilter filter)
66 return ApplicationManagerImpl.Instance.GetInstalledAppsAsync(filter);
70 /// GetInstalledAppsAsync asynchronous method.
72 /// <param name="filter">Filter is a InstalledApplicationMetadataFilter type. It consisting of a key and value pairs.</param>
73 /// <returns>It returns the filtered InstalledApplication informations asynchronously.</returns>
74 static public Task<IEnumerable<InstalledApplication>> GetInstalledAppsAsync(InstalledApplicationMetadataFilter filter)
76 return ApplicationManagerImpl.Instance.GetInstalledAppsAsync(filter);
80 /// GetRunningAppsAsync asynchronous method.
82 /// <returns>It returns the RunningApplication informations asynchronously.</returns>
83 static public Task<IEnumerable<RunningApplication>> GetRunningAppsAsync()
85 return ApplicationManagerImpl.Instance.GetRunningAppsAsync();
89 /// GetInstalledApp synchronous method.
91 /// <param name="applicationId"> string application id.</param>
92 /// <returns>It returns the InstalledApplication information synchronously.</returns>
93 static public InstalledApplication GetInstalledApp(string applicationId)
95 return ApplicationManagerImpl.Instance.GetInstalledApp(applicationId);
99 /// GetRunningApp synchronous method.
101 /// <param name="applicationId">string application id.</param>
102 /// <returns>It returns the RunningApplication information synchronously.</returns>
103 static public RunningApplication GetRunningApp(string applicationId)
105 return ApplicationManagerImpl.Instance.GetRunningApp(applicationId);
109 /// GetRunningApp synchronous method.
111 /// <param name="processId">int process id.</param>
112 /// <returns>It returns the RunningApplication information synchronously.</returns>
113 static public RunningApplication GetRunningApp(int processId)
115 return ApplicationManagerImpl.Instance.GetRunningApp(processId);
119 /// IsRunningApp synchronous method.
121 /// <param name="applicationId">string application id.</param>
122 /// <returns>bool. If the application is running, true; otherwise, false.</returns>
123 static public bool IsRunningApp(string applicationId)
125 return ApplicationManagerImpl.Instance.IsRunningApp(applicationId);
129 /// IsRunningApp synchronous method.
131 /// <param name="processId">int process id.</param>
132 /// <returns>bool. If the application is running, true; otherwise, false.</returns>
133 static public bool IsRunningApp(int processId)
135 return ApplicationManagerImpl.Instance.IsRunningApp(processId);