Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 06:16, 14 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Exporting calendar entries to a text file in Flash Lite

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

This code snippet demonstrates how to use the Calendar Service API in a Flash Lite 3.0 application to export calendar entries from the default calendar of the device to an external text file (supported from S60 5th Edition onwards).

Article Metadata
Code ExampleTested with
Devices(s): Nokia 5800 XpressMusic
Platform(s): S60 5th Edition
S60 5th Edition
Keywords: Service.Calendar, calendar.Export()
Created: User:Nokia Developer KB (15 Dec 2008)
Last edited: hamishwillee (14 May 2013)



The test device needs to have at least one calendar entry in the calendar.


// Import Platform Service Interface
// Heading of the application
heading_txt.text = "Export Calendar entries";
// Create a new Service object which has Calendar data
var calendar = new Service("Service.Calendar", "IDataSource");
// Get calendar entries from the default calendar application
// Define input parameters for the List of calendar entries
var inListParams = {Type:"CalendarEntry"};
// Define the result value for the List
var outListParams = calendar.GetList(inListParams);
var outList = outListParams.ReturnValue;
var outputListEntry = null;
var idList:Array = new Array();
text_txt.text += "Exported entries: \r";
// Go through all calendar events and push them to the array
do {
outputListEntry =;
if (null != outputListEntry) {
text_txt.text += "-""\r";
} else {
} while (true);
// Define the input data for the exported text file
var inputData = {IdList:idList, Format:"VCal",
// Define the input parameters for export
var inParams = {Type:"CalendarEntry", Data:inputData};
// Define the result value
var outParams = calendar.Export(inParams);
if (outParams.ErrorCode == 0) {
text_txt.text += "Export success!";
} else {
var errorId = outParams.ErrorCode;
text_txt.text += "\rError: "+errorId;


One exported entry is saved as example.txt in the C:\Data\Others directory. The IDs of all the exported calendar entries are displayed in the application.

Example application

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

See also

This page was last modified on 14 May 2013, at 06:16.
57 page views in the last 30 days.