×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Post Not able to read the telephone number for all the contacts in the phone using jsr-75

    Hi,
    When I try to read the contacts from the phone using jsr-75 for some of the contacts the Contact.countValues(Contact.TEL) API returns 0.But I am very sure that for those contacts the phone number is exist in the handset.

    The code I am using for reading the contacts is
    int total_phone_numbers=Single_Contact_PIM_Item.countValues(Contact.TEL);
    This is happening for me when I try to get the contacts in the phone NOKIA 3500 classic
    and also I tried without checking the countValues like
    String default_phone=Single_Contact_PIM_Item.getString(Contact.TEL,Contact.ATTR_NONE);
    this is also returns the index out of bound exception.

    Can some one help me ?

    Jainish cs

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Pune
    Posts
    189

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    Hello,

    Try this on your mobile phone.

    Best of Luck !!!
    Regards,
    Dinanath


    It's a matter of attitude.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    Thank you for your replay

    The example that you are send to me does not contain a solution for my problem.I have mentioned that I am able to read 420 contacts from the handset 3500 classic out of 500
    and when I try to read using 5130 I am able to get 496.And also I noticed that when changing the attribute of the phone number type to mobile for that particular contact from the phone and try to access it again I am able to read that contact number also.I want to read these contacts means what is default type in which the number is stored in the phone.

    Jainish

  4. #4
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    128

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    try this

    if(contactList.isSupportedField(Contact.TEL))
    {
    int phoneNumbers = contact.countValues(Contact.TEL);
    for(int j = 0; j < phoneNumbers; j++) {
    String tel= contact.getString(Contact.TEL, j);
    ............
    .............
    }
    Thanks & Regards
    Dip
    diptenduster@gmail.com

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    Thanks for the help

    int phoneNumbers = contact.countValues(Contact.TEL);
    The variable phoneNumbers is zero for some of the contacts.

    Jainish cs

  6. #6
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    128

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    can you compare format of those contacts
    Thanks & Regards
    Dip
    diptenduster@gmail.com

  7. #7
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    Re: Not able to read the telephone number for all the contacts in the phone using jsr

    Thank you for the replay

    The problem of returning the countValue as zero is for the contacts that I added when I received a call from some one else and I am adding that contact from the call log(there is an option to add contact).When change the Type of the contact telephone as mobile I am able to read the contact phone number.How can I able to fix this problem ?.

    Jainish cs

Similar Threads

  1. J2Me application to access Message Senders' phone number
    By tractorman in forum General Messaging
    Replies: 0
    Last Post: 2009-12-11, 13:36
  2. Retrieving Phone Number from Contacts database
    By dick_matthews in forum Symbian
    Replies: 5
    Last Post: 2009-03-16, 06:37
  3. About using PIM API to read Nokia 7360 contacts information
    By jack_lu in forum Mobile Java General
    Replies: 0
    Last Post: 2007-11-14, 08:17
  4. Can we view "unnamed" contacts through JSR 75
    By j2meDev in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-06-11, 12:44
  5. How to read phone number using AT command?
    By naoriya in forum General Messaging
    Replies: 1
    Last Post: 2002-10-09, 11:10

Posting Permissions

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