Launching Media Gallery from another Symbian app

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): Nokia E61i
Nokia E90 Communicator
Platform(s): S60 3rd Edition, MR
S60 3rd Edition, FP1
S60 3rd Edition, FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
Keywords: CCoeAppUi, TVwsViewId, RApaLsSession, TApaAppInfo,CCoeAppUi::ActivateViewL(const TVwsViewId& aViewId)
Created: tapiolaitinen (15 Feb 2008)
Last edited: hamishwillee (30 May 2013)



This code snippet demonstrates how to launch the Media Gallery application from another application.

This snippet can be self-signed.

MMP file

The following libraries are required:

  • LIBRARY    apgrfx.lib

Source file

#ifndef __SERIES60_3X__
#include <apgcli.h>
// The native Media Gallery application's UID in S60 2nd Edition, FP2 and newer,
// including S60 3rd Edition.
const TInt KGalleryUID3Post2ndEdFP1 = 0x101F8599;
// The native Media Gallery application's UID in S60 2nd Edition, FP1 and older.
const TInt KGalleryUID3Pre2ndEdFP1 = 0x101F4D8F;
// Gallery application's list view UID
const TInt KMediaGalleryListViewUID = 0x00000001;
TInt galleryUID3;
#ifdef __SERIES60_3X__
galleryUID3 = KGalleryUID3Post2ndEdFP1;
// In S60 2nd Edition you need to resolve which of the two UID3s is
// valid
RApaLsSession lsSession;
lsSession.GetAllApps(); // Prepare the server
TApaAppInfo aInfo;
// Try to get the Media Gallery application info
if (lsSession.GetAppInfo(aInfo,
TUid::Uid(KGalleryUID3Pre2ndEdFP1)) == KErrNotFound)
// Media Gallery was not found with UID3
// KGalleryUID3Pre2ndEdFP1, thus the platform is
// 2nd Ed. FP2 or newer
galleryUID3 = KGalleryUID3Post2ndEdFP1;
// The platform is S60 2nd Edition, FP1 or older
galleryUID3 = KGalleryUID3Pre2ndEdFP1;
// Gets viewId to activate Media Gallery view
TVwsViewId id = TVwsViewId(TUid::Uid(galleryUID3),


The Media Gallery application is launched.

See also

This page was last modified on 30 May 2013, at 07:39.
137 page views in the last 30 days.