|
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="JavaScript Contacts Service API"/><meta name="DC.Relation" scheme="URI" content="GUID-B8845FF1-D7F6-476A-8651-8B9C12D8789F"/><meta name="DC.Relation" scheme="URI" content="GUID-CABB28B8-D2B1-496B-BD7E-34FF496E60B4"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-A5853293-7B83-4CCE-9C29-B2B8F0CD8A18"/><title>JavaScript Contacts |
|
5 Service API </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-A5853293-7B83-4CCE-9C29-B2B8F0CD8A18"><span>JavaScript</span> Contacts |
|
8 Service API</h1><div> |
|
9 <p>The <a href="GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E.html#GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E">Contacts |
|
10 Service</a> API is supported since <a href="GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664.html#GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664">WRT 1.1</a>.</p> |
|
11 <p>The Contacts Service API allows <span>widgets</span> to access and manage |
|
12 information about contacts. This information can reside in one or more contacts |
|
13 databases stored on a device or in the SIM card database. The API is integrated |
|
14 into <span>WRT</span> through the <a href="GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559.html#GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559"><code>device</code></a> object.</p> |
|
15 <p>For an overview of the service and the API, see section <a href="GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E.html#GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E">Accessing and managing information about contacts</a>.</p> |
|
16 <div><h3>Using the Contacts Service API</h3> |
|
17 <p>To use the Contacts Service API, your <span>widget</span> must first create <span>a service object for it |
|
18 using the <a href="GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html#GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080"><code>device.getServiceObject()</code></a> method</span>. |
|
19 Use <code>Service.Contact</code> to identify the service provider |
|
20 and <code>IDataSource</code> to identify the supported interface:</p> |
|
21 <pre class="codeblock" id="GUID-7B1C567A-A31A-4AED-8F7B-9DFC175068AD">var so = device.getServiceObject("Service.Contact", "IDataSource");</pre> |
|
22 |
|
23 <p>This service object can then be used to access the services provided |
|
24 by the API:</p> |
|
25 <ul> |
|
26 <li><p><a href="GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007.html#GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007"><code>IDataSource.GetList()</code></a></p> |
|
27 </li> |
|
28 <li><p><a href="GUID-20D66938-A870-43D7-9515-AC7E22AEDC14.html#GUID-20D66938-A870-43D7-9515-AC7E22AEDC14"><code>IDataSource.Add()</code></a></p> |
|
29 </li> |
|
30 <li><p><a href="GUID-E6FAAB7C-EE2D-4464-9D0F-B1D89E26ABCF.html#GUID-E6FAAB7C-EE2D-4464-9D0F-B1D89E26ABCF"><code>IDataSource.Delete()</code></a></p> |
|
31 </li> |
|
32 <li><p><a href="GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5.html#GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5"><code>IDataSource.Import()</code></a></p> |
|
33 </li> |
|
34 <li><p><a href="GUID-CA7C3A7B-6733-47E0-9C6F-FBFB0993F034.html#GUID-CA7C3A7B-6733-47E0-9C6F-FBFB0993F034"><code>IDataSource.Export()</code></a></p> |
|
35 </li> |
|
36 <li><p><a href="GUID-F2CE0F94-324C-4D45-BD37-DA55F9DAC077.html#GUID-F2CE0F94-324C-4D45-BD37-DA55F9DAC077"><code>IDataSource.Organise()</code></a></p> |
|
37 </li> |
|
38 <li><p><a href="GUID-231C11D4-82B3-4202-8E86-DE8A3556C9DE.html#GUID-231C11D4-82B3-4202-8E86-DE8A3556C9DE"><code>IDataSource.Cancel()</code></a></p> |
|
39 </li> |
|
40 </ul> |
|
41 </div> |
|
42 <div><h3>Emulator support</h3> |
|
43 <p>The S60 5th Edition SDK emulator provides full support for the Contacts |
|
44 Service API. However, SIM-specific operations can only be run on a device.</p> |
|
45 </div> |
|
46 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html> |