×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    67

    i want to display all details of selected contact from contact database

    i am getting all contacts from contact database.
    when i click center button then i get all details of that contact..
    i have used CPbkContactEditorDlg to get all details..but problem is it display details in edit mode..
    i dont want to edit any contact details..just want to show...
    how i can show details without edit...

    following code i am using to display details..

    TInt currentItemIndex( iListBox->CurrentItemIndex() );

    TContactItemId itemId=currentItemIndex;

    CPbkContactEngine* pbkContactEng =
    CPbkContactEngine::NewL(&iCoeEnv->FsSession());
    CleanupStack::PushL( pbkContactEng );
    // load the contacts dialog resources
    CCoeEnv *env = CEikonEnv::Static();
    RPbkViewResourceFile pbkRes( *env );
    pbkRes.OpenL();

    CPbkContactItem* aContactItem = pbkContactEng->OpenContactL( itemId );
    CleanupStack::PushL( aContactItem );

    // Open the contacts dialog
    // third parameter: set to true if aContactItem is a
    // new contact (not yet in the database)
    // fourth parameter index of field to focus initially
    // fifth paramter if true sets the contact initially as "edited".
    CPbkContactEditorDlg* pbkContactDlg =
    CPbkContactEditorDlg::NewL( *pbkContactEng,
    *aContactItem,
    EFalse, -1,
    EFalse );

    CleanupStack::PushL( pbkContactDlg );
    pbkContactDlg->SetMopParent( iAvkonAppUi );

    TInt res( KErrNone );
    TRAPD( err, res = pbkContactDlg->ExecuteLD() );

    pbkRes.Close();
    pbkContactEng->CloseContactL( aContactItem->Id() );

    CleanupStack::Pop( pbkContactDlg );
    CleanupStack::PopAndDestroy( 2 ); //aContactItem, pbkContactEng

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Re: i want to display all details of selected contact from contact database

    Hi I want to do the same thing.
    If you have got any solution to the same, please let me know.



    Thanks in adv
    Debasish

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: i want to display all details of selected contact from contact database

    Quote Originally Posted by d.samal View Post
    Hi I want to do the same thing.
    If you have got any solution to the same, please let me know.



    Thanks in adv
    Debasish
    On way is to use CPbkSingleEntryFetchDlg

  4. #4
    Registered User
    Join Date
    Dec 2009
    Posts
    49

    Re: i want to display all details of selected contact from contact database

    CPbkViewState * pbkViewParam = CPbkViewState::NewLC() ;
    pbkViewParam->SetFocusedContactId( itemId ) ; //TContactItemId itemId ,your
    pbkViewParam->SetFocusedFieldIndex(TInt(1)) ;
    HBufC8* paramBuf = pbkViewParam->PackLC() ;
    const TUid appUid = {0x101f4cce};
    CEikonEnv::Static()->AppUi()->ActivateViewL(TVwsViewId(appUid, TUid::Uid(3)), CPbkViewState::Uid(), *paramBuf);
    //ActivateViewL(TVwsViewId(appUid, TUid::Uid(4)), CPbkViewState::Uid(), *paramBuf);
    CleanupStack::PopAndDestroy(2) ;

    this code can also worked. but the only problem is that when you take 'exit' to exit ,it is first return to contact view ,then you should take 'exit' again to return to your original view !

    more things :
    http://wiki.forum.nokia.com/index.ph...act_group_view
    http://wiki.forum.nokia.com/index.ph...A7%86%E5%9B%BE

Similar Threads

  1. Contact Name Display during Call Initiation
    By chandran.biju007 in forum Symbian
    Replies: 5
    Last Post: 2009-07-03, 11:58
  2. How To Use Contact Database
    By Kaz32 in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-02-19, 04:47
  3. Replies: 10
    Last Post: 2008-06-05, 13:36
  4. Replies: 3
    Last Post: 2007-12-06, 12:55
  5. Replies: 4
    Last Post: 2007-12-06, 12:50

Posting Permissions

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