How to get a list of all apps installed on a Symbian device

From Nokia Developer Wiki
Jump to: navigation, search

Article Metadata
Tested with
Devices(s): All (Symbian OS)
Platform(s): S60, Series 80
Keywords: RApaLsSession::GetAllApps()
Created: User:Technical writer 2 (June 9, 2005, updated October 21, 2008)
Last edited: hamishwillee (30 May 2013)


The following code creates a text file containing a list of all applications and their UID values. It can be run on any Symbian OS phone.


 #include <f32file.h>    // link against efsrv.lib
#include <apgcli.h> // link against apgrfx.lib, apparc.lib
_LIT(KFileName, "c:\\applications.txt");
const TInt KMaxSize = 512;
LOCAL_C void WriteAppInfoToFileL()
RFs fs;
RFile file;
RApaLsSession lsSession;
// Connect to file server
User::LeaveIfError( fs.Connect() );
CleanupClosePushL( fs );
// Connect to application architecture server
User::LeaveIfError( lsSession.Connect() );
CleanupClosePushL( lsSession );
// Open (replace if exists) the file for writing
file.Replace( fs, KFileName, EFileWrite | EFileStreamText );
CleanupClosePushL( file );
TApaAppInfo appInfo;
TBuf<KMaxSize> buf;
TBuf8<KMaxSize> fileBuf;
// Get info on all apps, then iterate through each app
// and write its info (caption, name, uid) to file
while( lsSession.GetNextApp( appInfo ) == KErrNone )
buf.AppendNum( (TUint)aInfo.iUid.iUid, EHex );
buf.Append( _L("\t") );
buf.Append( appInfo.iCaption );
buf.Append( _L("\t") );
buf.Append( appInfo.iFullName );
fileBuf.Copy( buf );
fileBuf.Append( _L("\n") );
file.Write( fileBuf );
CleanupStack::PopAndDestroy( 3 ); // file, lsSession, fs
This page was last modified on 30 May 2013, at 07:38.
83 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.