Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User veekay_a's Avatar
    Join Date
    Feb 2008
    Posts
    23
    Hi,
    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
    Veekay.

  2. #2
    Regular Contributor rkmohanty's Avatar
    Join Date
    Dec 2007
    Location
    Banglore,India
    Posts
    156
    CPbkContactEngine* iPbkContactEngine = CPbkContactEngine::NewL();

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

    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 Python
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved