You Are Here:

Community: Developer Discussion Boards

#1 Old Question creating different kind of CONTACTS list..need help..... - 2008-12-12, 11:13

Join Date: Oct 2008
Posts: 203
Send a message via Yahoo to rahulvala
rahulvala's Avatar
rahulvala
Offline
Regular Contributor
currently nokia providing contact list of name only ...
I am working in a project in which mobile number is also displayed below the name of the person.....

I need help ...
I need some change in the code ....
code is given below:

import contacts

db = contacts.open() # open the database to add an contact
contact = db.add_contact()
contact.add_field('first_name',u'abc')
contact.add_field('mobile_number',u'99986532312')
contact.commit()



What kind of change I require in this code ?
tell me.....
Reply With Quote

#2 Old Re: creating different kind of CONTACTS list..need help..... - 2008-12-12, 11:25

Join Date: Sep 2006
Posts: 61
niyaz.khan's Avatar
niyaz.khan
Offline
Regular Contributor
Hi, No need to create a new contact database. Every thing which is there in the nokia contact database u can re use for ur requiremnt.
Just go through this link.

http://www.forum.nokia.com/info/sw.n..._0_en.zip.html


Niyaz
Reply With Quote

#3 Old Re: creating different kind of CONTACTS list..need help..... - 2008-12-12, 11:31

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by rahulvala View Post
currently nokia providing contact list of name only ...
I am working in a project in which mobile number is also displayed below the name of the person.....

I need help ...
I need some change in the code ....
code is given below:

import contacts

db = contacts.open() # open the database to add an contact
contact = db.add_contact()
contact.add_field('first_name',u'abc')
contact.add_field('mobile_number',u'99986532312')
contact.commit()



What kind of change I require in this code ?
tell me.....
The code you have written is to add contacts and not to retrieve them. From what I can understand, from your post, your aim is to retrieve the contact number and list the name and phone number.

Below is the code example used to find a number - when the name is provided. You can modify it and use to achieve your requirement,

Code:
from appuifw import * 

from telephone import *

import contacts

old_body=app.body

db=contacts.open()

entry =db.find(query(u'Insert name','text'))

L=[]

for item in entry:

	L.append(item.title)

if len(L)>0:

	index = appuifw.selection_list(choices=L , search_field=0)

	num=entry[index].find('mobile_number')[0].value

	dial(num)

else:

	note(u'No matches','error')

app.body=old_body

app.set_exit()

Best Regards,
Croozeus
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
creating different kind of CONTACTS list..need help..... rahulvala Python 1 2008-12-12 11:32
Display a text file pierre_remi Python 3 2008-11-10 10:29
help! A problem about creating list zhx1020 Symbian 2 2007-07-09 08:29
Sending and SMS using the contacts list paulaamills Symbian Networking & Messaging 0 2006-04-01 14:35
Bluetooth Virtual Serial Port mealos Bluetooth Technology 2 2004-12-03 04:46

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