Namespaces
Variants
Actions

Activate contact group view

Jump to: navigation, search
Article Metadata

Article
Created: mayankkedia (12 May 2009)
Last edited: hamishwillee (20 Jul 2012)


The following example shows how to navigate to a chosen contact group view of the native contacts application. The CPbkViewState class can be used to pass parameters the phonebook application when launching the application with the symbian view launching mechanism.

The API was published in S60 1st Edition and has been deprecated in the 5th Edition.

Header file required:

#include <cpbkviewstate.h>

CPbkViewState link against library pbkview.lib so add following line to your .mmp file.

LIBRARY pbkview.lib

Add following lines in .cpp file.

CPbkViewState* pbkViewParam = CPbkViewState::NewLC();
pbkViewParam->SetFocusedContactId(/*Your group id*/);
 
// Package and return object in a buffer.
HBufC8* paramBuf = pbkViewParam->PackLC();
 
// Uid for Contacts application
const TUid appUid = {0x101f4cce};
 
// Activate the view
// 3 is the Contact Group Info View's ID
AppUi()->ActivateViewL(TVwsViewId(appUid, TUid::Uid(0x03)), CPbkViewState::Uid(), *paramBuf);
 
// Cleanup
CleanupStack::PopAndDestroy(2); // paramBuf, pbkViewParam

Added by - Mayank on 12/05/2009

Links

Create a contact group

This page was last modified on 20 July 2012, at 05:05.
106 page views in the last 30 days.
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