org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E092BF10-C076-4476-9E80-87919940201B.html
author Eugene Ostroukhov <eugeneo@symbian.org>
Thu, 15 Jul 2010 10:08:51 -0700
changeset 450 ed815e0eef9a
parent 229 716254ccbcc0
permissions -rw-r--r--
Bug 3268 - Debugger does not start on Windows XP


<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="Accessing and launching installed applications"/><meta name="DC.Relation" scheme="URI" content="GUID-AE9A928B-F938-49B5-BC9E-72CB42046571"/><meta name="DC.Relation" scheme="URI" content="GUID-1EFD7043-E9B8-4B4E-9EA6-A20B3EECC14A"/><meta name="DC.Relation" scheme="URI" content="GUID-46EABDC1-37CB-412A-ACAD-1A1A9466BB68"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-E092BF10-C076-4476-9E80-87919940201B"/><title>Accessing
and launching installed applications </title><script type="text/javascript">
      function initPage() {}
    </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-E092BF10-C076-4476-9E80-87919940201B">Accessing
and launching installed applications</h1><div>
<p>The <a href="GUID-2D651505-F68C-4053-B565-9FF826C5B897.html#GUID-2D651505-F68C-4053-B565-9FF826C5B897">AppManager
Service API</a> allows <span>widgets</span> to access and launch applications
on a device. You can use the AppManager Service to create <span>widgets</span> that:</p>
<ul>
<li><p>Retrieve a list of user-installed applications</p></li>
<li><p>Retrieve a list of all applications on the mobile device,
regardless of whether they were preinstalled or installed by the user</p>
</li>
<li><p>Launch an application based on an application UID</p>
</li>
<li><p>Launch an application based on a given document or MIME type</p>
</li>
</ul>
<p>The service allows <span>widgets</span> to launch applications as chained
(embedded) or stand-alone. This provides the following functionality:</p>
<ul>
<li><p>Embedded applications are launched within another application
and share the same process. All UI features (such as the options list and
icons displayed in the header) belong to the launching application, not the
embedded application. For example, embedding the browser to display HTML within
an SMS message is a typical use case. In this case, all UI features belong
to the messaging application.</p></li>
<li><p>Stand-alone applications are independent of other applications
- they do not share the same process.  Applications can launch other applications
as stand-alone, in which case they run as peer applications. For example,
launching the browser when a user selects a URL within an SMS message is a
typical use case. In this case, the user can swap between the browser and
messaging applications.</p></li>
</ul>
<div><h3>Accessing the API and supported methods</h3>
<p>To create a <a href="GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html#GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080">service
object</a> for the AppManager Service API, use <code>Service.AppManager</code> to
identify the service provider and <code>IAppManager</code> to identify
the supported interface:</p>

<pre class="codeblock" id="GUID-A2F3BA97-7375-4A1A-82EB-B7D0CCFDBB63-GENIDd0e6831">var so = device.getServiceObject("Service.AppManager", "IAppManager");</pre>
<p>The <code>IAppManager</code> interface provides the following
methods:</p>
<ul>
<li><p><a href="GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952.html#GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952"><code>GetList()</code></a></p>

<p>Use the <code>GetList()</code> method to get a list of user-installed
applications or all applications on the mobile device.</p>

</li>
<li><p><a href="GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C.html#GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C"><code>LaunchApp()</code></a></p>

<p>Use the <code>LaunchApp()</code> method to launch
an application based on the application UID. Use <code>GetList()</code> to
retrieve the correct UID.</p>

</li>
<li><p><a href="GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA.html#GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA"><code>LaunchDoc()</code></a></p>

<p>Use the <code>LaunchDoc()</code> method to launch an application
based on a given document or a MIME type.</p>

</li>
<li><p><a href="GUID-64CC3AB4-5444-474A-9470-818F423C5611.html#GUID-64CC3AB4-5444-474A-9470-818F423C5611"><code>Cancel()</code></a></p>

<p>Use the <code>Cancel()</code> method to cancel an ongoing asynchronous
call. This method is valid for any asynchronous call made through the AppManager
Service API.</p>

</li>
</ul>
<p/>
</div>
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>