×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    1

    PIM UID field assigned manually (Series40)

    Hi all!
    Does anybody know if it is possible to assign UID field manually via PIM API (JSR-75)? Because when I create contact via javax.microedition.pim.ContactList.createContact() and then call javax.microedition.pim.Contact.commit() the UID seem to be assigned automatically. But I'd like to assign different value.
    I've tried to set UID field value before Contact.commit(), however phone seems to ignore it and sets it's own, automatically generated UID. Of course it's not possible to change UID field after it was committed.

    I've also noticed, that on Series40 (don't know how it works for different families) UIDs are reused. So if you have contacts (UID field value is in brackets) in your phonebook:

    A(1), B(2), C(3), D(4)

    delete A and B, and add E and F, you phonebook will look as follows:

    C(3), D(4), E(1), F(2) - so UID is reused.

    I suppose that there is no way to turn of this "reusability".

    Thanks in advance for answers.

  2. #2
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    81

    Re: PIM UID field assigned manually (Series40)

    Yes u r right.The behaviour of phone u r seeing that can't be changed.

    Thanks

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

    Re: PIM UID field assigned manually (Series40)

    No, You can not assign UID manually they are auto assigned when you commit a contact item to PIM.

    As per Nokia PIM API documentation:

    public interface Contact extends PIMItem

    public static final int UID:
    Field specifying a unique ID for a Contact. This field can be used to check for identity using String.equals. UID is read only if the Contact has been committed to a ContactList at least once in its lifetime. The UID is not set if the Contact has never been committed to a ContactList; countValues(UID) returns 0 before a newly created Contact object is committed to its list. The attribute is valid for the persistent life of the Contact and may be reused by the platform once this particular Contact is deleted. Data for this field is of String data type.

    thanks,
    ~Amitabh
    Impetus

Similar Threads

  1. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41
  2. UnSupported Field exception:105 in PIM
    By devdattac in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2008-10-02, 06:30
  3. Replies: 1
    Last Post: 2007-08-14, 06:40
  4. Updating contactcard in java using the UID field
    By matadex in forum PersonalJava
    Replies: 0
    Last Post: 2002-06-17, 10:38

Posting Permissions

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