org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E092BF10-C076-4476-9E80-87919940201B.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <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
       
     5 and launching installed applications </title><script type="text/javascript">
       
     6       function initPage() {}
       
     7     </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
       
     8 and launching installed applications</h1><div>
       
     9 <p>The <a href="GUID-2D651505-F68C-4053-B565-9FF826C5B897.html#GUID-2D651505-F68C-4053-B565-9FF826C5B897">AppManager
       
    10 Service API</a> allows <span>widgets</span> to access and launch applications
       
    11 on a device. You can use the AppManager Service to create <span>widgets</span> that:</p>
       
    12 <ul>
       
    13 <li><p>Retrieve a list of user-installed applications</p></li>
       
    14 <li><p>Retrieve a list of all applications on the mobile device,
       
    15 regardless of whether they were preinstalled or installed by the user</p>
       
    16 </li>
       
    17 <li><p>Launch an application based on an application UID</p>
       
    18 </li>
       
    19 <li><p>Launch an application based on a given document or MIME type</p>
       
    20 </li>
       
    21 </ul>
       
    22 <p>The service allows <span>widgets</span> to launch applications as chained
       
    23 (embedded) or stand-alone. This provides the following functionality:</p>
       
    24 <ul>
       
    25 <li><p>Embedded applications are launched within another application
       
    26 and share the same process. All UI features (such as the options list and
       
    27 icons displayed in the header) belong to the launching application, not the
       
    28 embedded application. For example, embedding the browser to display HTML within
       
    29 an SMS message is a typical use case. In this case, all UI features belong
       
    30 to the messaging application.</p></li>
       
    31 <li><p>Stand-alone applications are independent of other applications
       
    32 - they do not share the same process.  Applications can launch other applications
       
    33 as stand-alone, in which case they run as peer applications. For example,
       
    34 launching the browser when a user selects a URL within an SMS message is a
       
    35 typical use case. In this case, the user can swap between the browser and
       
    36 messaging applications.</p></li>
       
    37 </ul>
       
    38 <div><h3>Accessing the API and supported methods</h3>
       
    39 <p>To create a <a href="GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html#GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080">service
       
    40 object</a> for the AppManager Service API, use <code>Service.AppManager</code> to
       
    41 identify the service provider and <code>IAppManager</code> to identify
       
    42 the supported interface:</p>
       
    43 
       
    44 <pre class="codeblock" id="GUID-A2F3BA97-7375-4A1A-82EB-B7D0CCFDBB63-GENIDd0e6831">var so = device.getServiceObject("Service.AppManager", "IAppManager");</pre>
       
    45 <p>The <code>IAppManager</code> interface provides the following
       
    46 methods:</p>
       
    47 <ul>
       
    48 <li><p><a href="GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952.html#GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952"><code>GetList()</code></a></p>
       
    49 
       
    50 <p>Use the <code>GetList()</code> method to get a list of user-installed
       
    51 applications or all applications on the mobile device.</p>
       
    52 
       
    53 </li>
       
    54 <li><p><a href="GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C.html#GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C"><code>LaunchApp()</code></a></p>
       
    55 
       
    56 <p>Use the <code>LaunchApp()</code> method to launch
       
    57 an application based on the application UID. Use <code>GetList()</code> to
       
    58 retrieve the correct UID.</p>
       
    59 
       
    60 </li>
       
    61 <li><p><a href="GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA.html#GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA"><code>LaunchDoc()</code></a></p>
       
    62 
       
    63 <p>Use the <code>LaunchDoc()</code> method to launch an application
       
    64 based on a given document or a MIME type.</p>
       
    65 
       
    66 </li>
       
    67 <li><p><a href="GUID-64CC3AB4-5444-474A-9470-818F423C5611.html#GUID-64CC3AB4-5444-474A-9470-818F423C5611"><code>Cancel()</code></a></p>
       
    68 
       
    69 <p>Use the <code>Cancel()</code> method to cancel an ongoing asynchronous
       
    70 call. This method is valid for any asynchronous call made through the AppManager
       
    71 Service API.</p>
       
    72 
       
    73 </li>
       
    74 </ul>
       
    75 <p/>
       
    76 </div>
       
    77 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>