×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    14

    How to write contacts in phonebook

    Hi,

    In my application i am adding contacts to my phonebook.
    If the phonebook is having "Tester" contact,when i am trying to add the same contact again
    then it is adding again.I need to overwrite it.



    Thanks,
    Susmitha

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: How to write contacts in phonebook

    let me rephrase this to see if i get it correctly :

    you want to look for a contact, if it exists replace it, else add it ?

    first you have to define what you mean by "the same contact". then you perform a search on the contact list matching your criteria, then save or update your contact.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to write contacts in phonebook

    yeah njzk2 solution is suitable to your need.

    You just read the contact details that the user is going to enter and while you are going to save just check whether this is there in the list, if yes then just either replace/overwrite or display the alert to the user.Else add the same in the list as the fresh contact.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: How to write contacts in phonebook

    In my application i am adding contacts to my phonebook.
    If the phonebook is having "Tester" contact,when i am trying to add the same contact again
    then it is adding again.I need to overwrite it.
    When ever you go to your add Contact method, create the item and search the Contact list to return matching item, if it is found overwrite it and commit and close the contact list. If not found add to contact list, commit and close.

    Ref to: http://wiki.forum.nokia.com/index.ph...cts_in_Java_ME
    http://wiki.forum.nokia.com/index.ph...act_in_Java_ME
    http://wiki.forum.nokia.com/index.ph...ook_in_Java_ME

    thanks,
    ~Amitabh
    Last edited by im2amit; 2010-05-05 at 17:10.

Similar Threads

  1. CMdaAudioOutputStream unexpected playback pauses on Nokia E51
    By pkolaczk in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2009-07-29, 15:13
  2. Is it possible to read from & write in sim card contacts
    By pingalekishor in forum Mobile Java General
    Replies: 5
    Last Post: 2009-07-08, 14:09
  3. Problem in using getting contacts from Phonebook
    By nisheethpandey in forum Symbian
    Replies: 9
    Last Post: 2009-03-26, 19:15
  4. How can I read and write the phonebook?
    By xiejef in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-04-29, 04:55
  5. Replies: 0
    Last Post: 2003-06-26, 08:36

Posting Permissions

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