×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Distinguish between phone calls and calls initiated from Contacts

    Hi,

    if a make a phone call on S60 I get intercept the phone call and get the phone number which is called.

    Now calls can be made in different ways:

    1. From the Idle screen by entering the phone number or use a shortcut (voice command or single key press).

    2. From the Contact applications.

    In case 2 using the phone number I can search the contacts DB to find the contact which is called (and display the name, etc).

    To me this does not sound as the optimum way to do such a thing. Basically my question is: is it possible for my application to know whether a phone call is initiated from the Contacts application and in that case can I get the complete contact record right away through some observer without doing a search through the complete contacts DB or is this impossible?

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Distinguish between phone calls and calls initiated from Contacts

    Unfortunately not. You have to do the search yourself. Also you should beware of searching through long (1000+) contact db. There's a KI regarding this and voip calls for instance: http://wiki.forum.nokia.com/index.ph...ith_VoIP_calls

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Distinguish between phone calls and calls initiated from Contacts

    Since the device obviously does this search when an incoming call occurs (and it happens pretty fast), I would guess that such a search functionality is already implemented. CContactDatabase::MatchPhoneNumberL can be something you might want to try.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: Distinguish between phone calls and calls initiated from Contacts

    Hi, thanks both of you for the comments.

    From my collegue developer I understand there could be a problem when the user has stored the same phone number for two contact items. In that case the correct contact can not be resolved and the phone does not show the caller's name when there is an incoming call. Is this an issue which is known to S60? And/or will it be resolved?

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Distinguish between phone calls and calls initiated from Contacts

    It is true, the phone does the matching with the last 7 digits, and does not display anything if ambiguity occurs.
    However you are free to match more digits, and you can also do some ambiguity-handling for yourself, since MatchPhoneNumberL gives you an array of candidate contacts. If it has more than one element, you can decide displaying some other property, what all candidate contacts have in common (like family name or company).

Similar Threads

  1. Replies: 0
    Last Post: 2007-09-09, 22:01
  2. Detecting incoming voice calls (Card Phone 2.0 + AT commands)
    By RISC_sleitner in forum Multimodecards
    Replies: 1
    Last Post: 2003-03-18, 07:06

Posting Permissions

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