This page was last modified 12:24, 21 February 2008.
CS000828 - Launching Media Gallery from another application
From Forum Nokia Wiki
| ID | CS000828 | Creation date | February 21, 2008 |
| Platform | S60 3rd Edition, MR S60 3rd Edition, FP1 S60 3rd Edition, FP2 | Tested on devices | Nokia E61i Nokia E90 Communicator |
| Category | Symbian C++ | Subcategory | |
| APIs | None | Classes | CCoeAppUi TVwsViewId RApaLsSession TApaAppInfo |
| Methods | CCoeAppUi::ActivateViewL(const TVwsViewId& aViewId) |
Overview
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> #endif
// 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; #else // In S60 2nd Edition you need to resolve which of the two UID3s is // valid RApaLsSession lsSession; User::LeaveIfError(lsSession.Connect()); CleanupClosePushL(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; } else { // The platform is S60 2nd Edition, FP1 or older galleryUID3 = KGalleryUID3Pre2ndEdFP1; } CleanupStack::PopAndDestroy(&lsSession); #endif // Gets viewId to activate Media Gallery view TVwsViewId id = TVwsViewId(TUid::Uid(galleryUID3), TUid::Uid(KMediaGalleryListViewUID)); ActivateViewL(id);
Postconditions
The Media Gallery application is launched.
See also
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SIP Resolver Plugin Problem | bifihi | VoIP | 2 | 2007-06-08 13:26 |
| help with sound media player with animated pictures | larry_ger | Mobile Java General | 0 | 2003-02-25 10:50 |
| Motorola Gallery | davidmanpearl | Mobile Java Media (Graphics & Sounds) | 1 | 2008-04-25 15:11 |
| disable Gallary to show skin png | rpunskyy | General Symbian C++ | 7 | 2007-10-24 10:32 |
| Do we have any libraries to use a background media player? | mike_smith | Mobile Java Media (Graphics & Sounds) | 0 | 2007-05-09 10:30 |

