Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2008

    Retriving Contact No

    In my application i am opening the default database which will display only the names, when selected any particular name it will show the details, like ph no, email etc. For the screen where only names are displayed i have included an option called retrieve no.

    I wanted to know how to get only the contact no of the selected name from the list. with that contact no i will be doing further operations in my application.

    Thanks in advance

  2. #2
    Regular Contributor
    Join Date
    Dec 2007

    Re: Retriving Contact No

    CPbkContactEngine* iPbkContactEngine = CPbkContactEngine::NewL();

    RPbkViewResourceFile phonebookResource( *(CEikonEnv::Static() ) );
    if ( !phonebookResource.IsOpen() )

    CContactDatabase::TContactViewFilter filter(CContactDatabase::EPhonable)
    CPbkMultipleEntryFetchDlg::TParams params;
    params.iContactView = &iPbkContactEngine->FilteredContactViewsL(filter);

    for ( TInt i = 0; i < paramCount; ++i )
    const TContactItemId contactID = ( *params.iMarkedEntries )[ i ];
    // Open the current contact from Phonebook (using Pbk-engine)
    CPbkContactItem* pbkItem = phonebookEngine->ReadContactL( contactID );
    HBufC* num= tempAddress.AllocL();
    array.AppendL(*num); // here array is of descriptor type which is member variable of class

    or u can use CContactDataBase

    CContactDatabase *aDatabase = CContactDatabase::OpenL(databaseName);
    CContactItem *item = aDatabase->ReadContactLC(contactId);

Similar Threads

  1. Random RingTone within Contact List for 3rd
    By cckfranky in forum Symbian
    Replies: 5
    Last Post: 2007-12-29, 18:33
  2. PIM API: updating contact causes a reboot on 6270!
    By suzier in forum Mobile Java General
    Replies: 8
    Last Post: 2007-04-03, 07:29
  3. Replies: 3
    Last Post: 2006-10-09, 12:24
  4. contact number and contact names doesn't match.
    By ninidotnet in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-10-09, 09:25

Posting Permissions

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