How to discover all installed applications
RApaLsSession can be used to get all currently installed applications from the device. The following code sample shows how to get an array containing names of the installed applications:
const TInt KArrGranularity = 10;
CDesCArrayFlat* MyArray = new(ELeave) CDesCArrayFlat(KArrGranularity);
ErrnoNo = ls.GetNextApp(AppInfo);
if(ErrnoNo == KErrNone && AppInfo.iCaption.Length())
} while(ErrnoNo == KErrNone);
CleanupStack::PopAndDestroy(); // ls
If you are interrested only in not hidden applications you may want to add some code like:
//Get app capabilities
//Don't show hidden apps
To get application list change notifications take a look at CApaAppListNotifier from apgnotif.h.
TApaAppInfo also has many other information items of the application that can be utilized when airing application information, for example Get application icon shows how to get the application icon using the application UID that van be retrieved using the code sample shown above.