You Are Here:

Community: Wiki

This page was last modified on 15 December 2008, at 14:43.

CS001221 - Importing contacts in Flash Lite

From Forum Nokia Wiki



ID CS001221 Creation date December 15, 2008
Platform S60 5th Edition Tested on devices Nokia 5800 XpressMusic
Category Flash Lite Subcategory S60 Platform Services


Keywords (APIs, classes, methods, functions): Service.Contact, contact.Import()

Overview

The following code snippet demonstrates how to use the Contact Service API in a Flash Lite 3.0 application to import a contact from the VCard file to the phonebook (supported from S60 5th Edition onwards).

Source

// Import Platform Service Interface
import com.nokia.lib.Service;
// Heading of the application
heading_txt.text = "Import Contact";
 
// Create a new Service object which has Calendar data
var contact = new Service("Service.Contact", "IDataSource");
 
// Define the VCrad file for import
var inputData = {SourceFile:"c:\\Data\\Others\\contact.vcf"};
 
// Define input parameters
var inParams = {Type:"Contact", Data:inputData};
 
// Define result value
var outParams = contact.Import(inParams);
 
// Check if Import is successful
if (outParams.ErrorCode == 0) {
text_txt.text += "Import success!";
} else {
var errorId = outParams.ErrorCode;
text_txt.text += "\rError: "+errorId;
}

Note: To perform a successful contact import with this application you need to have a contact.vcf file which includes valid VCard format data at the location c:\\Data\\Others\\contact.vcf.

Postconditions

Imported contact information (Eric Example) can be found from the default phonebook of the device.

Example application

The following sample application has been tested in Nokia 5800 XpressMusic (S60 5th edition, Flash Lite 3.0).
File:FlashLite Import Contact.zip

See also

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fCS001256E5fE2dE5fE4caunchingE5fanE5finstalledE5fapplicationE5finE5fFlashE5fE4citeX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZflashQ qfnZtopicQUqfnTopicZflashE5fliteQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ