×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    24

    Acess contacts for j2me........

    Hi,

    I am trying to acess contacts from phone as well as sim......

    contactList.isSupportedField(Contact.TEL)
    this shows that filed is supported by phone

    but
    contact.getString(Contact.TEL, contact.countValues(Contact.TEL));

    is not giving me contact..

    where i am going wrong.

    i am doing this for n96

    any help?

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

    Re: Acess contacts for j2me........

    contact.getString(Contact.TEL, contact.countValues(Contact.TEL));
    This contact item might not have any of the Contact.TEL filed assigned.

    thanks,
    ~Amitabh

  3. #3
    Registered User
    Join Date
    Mar 2010
    Posts
    24

    Re: Acess contacts for j2me........

    thanks for quick reply......


    how should i access the no. which ever is available......
    because some times mobile no. is available & sometime home & sometimes any other.

    Do u have any example, link, idea?

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

    Re: Acess contacts for j2me........

    Ref to PDAPDemo PIM example of SUN WTK, that can give you good starting point for JSR-75, PIM access.

    thanks,
    ~Amitabh

  5. #5
    Registered User
    Join Date
    Mar 2010
    Posts
    22

    Re: Acess contacts for j2me........

    int countValues = 0;
    if (item!= null)
    {
    countValues = item.countValues(BlackBerryContact.EMAIL);
    String valueEmail = null;
    for(int j=0; j< countValues; j++)
    {
    valueEmail = item.getString(BlackBerryContact.EMAIL,j);

    }
    if( item!= null)

    { // Get selected contact from contact list.
    countValues = item.countValues(BlackBerryContact.TEL);
    String value = null;
    for (int i =0 ; i<countValues ;i++)
    {
    value = item.getString(BlackBerryContact.TEL,i);
    }


    by this ,you can selct any any contact From the Contact List with phone number whether ,it is any attributes.
    this will help you .

    thnks and regards
    amrinder singh

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

    Re: Acess contacts for j2me........

    how should i access the no. which ever is available......
    because some times mobile no. is available & sometime home & sometimes any other.
    PHP Code:
    //  item = a contact item fetched from contact list. 
    int countValues item.countValues(Contact.TEL);
    String value null;
    for (
    int i =i<countValues ;i++)
    {
    value item.getString(Contact.TEL,i);

    thanks,
    ~Amitabh

Similar Threads

  1. Access contacts from contacts view
    By sandeepkumar03 in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-10-01, 06:02
  2. Contacts imports memory consumption problem.
    By senthil_epigon in forum Symbian
    Replies: 2
    Last Post: 2009-04-30, 05:57
  3. [Moved] Problems with the contacts on my 6500 slide
    By realraptor06 in forum General Development Questions
    Replies: 3
    Last Post: 2008-11-18, 13:18
  4. Replies: 6
    Last Post: 2007-04-24, 21:36
  5. PIM API adding new contacts problem
    By hoppelmoppel in forum Mobile Java General
    Replies: 3
    Last Post: 2007-04-22, 17:12

Posting Permissions

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