×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Question creating different kind of CONTACTS list..need help.....

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

  2. #2
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    61

    Re: creating different kind of CONTACTS list..need help.....

    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

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,801

    Re: creating different kind of CONTACTS list..need help.....

    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
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Replies: 1
    Last Post: 2008-12-12, 10:32
  2. Display a text file
    By pierre_remi in forum Symbian
    Replies: 3
    Last Post: 2008-11-10, 09:29
  3. Sending and SMS using the contacts list
    By paulaamills in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-04-01, 13:35
  4. Bluetooth Virtual Serial Port
    By mealos in forum Bluetooth Technology
    Replies: 2
    Last Post: 2004-12-03, 03:46

Posting Permissions

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