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.

Archived:How to handle contacts in m

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}}.

M on Symbian is not maintained and may not run on current Symbian versions. All M articles have been archived.

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Platform(s): S60 2nd Edition, S60 3rd Edition, S60 5th Edition
S60 5th Edition
Platform Security
Capabilities: )
Created: bogdan.galiceanu (22 May 2009)
Last edited: hamishwillee (09 May 2013)



This article shows how to add, find and delete contacts in m.


Note: The add and delete functions require the WriteApp permission. The find and get functions require the ReadApp permission.

Source code

Adding a contact

use contacts
//Create a contact as an array of key-value pairs
my_contact = ["name":"Doe", "fname":"John", "phone":"1234567890", "email":""]
//Add it to the database

Finding contacts

use contacts
//Get the ids of the contacts that match the criteria
ids = contacts.find("John Doe", ["fname", "name"])
//Get the corresponding contact objects and display all their information
for id in ids do
my_contact = contacts.get(id);
for i in keys(my_contact) do
print contacts.labels()[i] + ": " + my_contact[i]

Deleting contacts

use contacts
//Get the ids of the contacts that match the criteria
ids = contacts.find("John Doe", ["fname", "name"])
//Delete them all
for id in ids do


Contacts are added, found or deleted.

Additional information

Details about the functions used in the snippets above and others are available in the m library.

This page was last modified on 9 May 2013, at 02:44.
30 page views in the last 30 days.