×
Namespaces

Variants
Actions

How to Display the Uid of Applications installed on 3.0 phones

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: ltomuta (09 Jul 2007)
Last edited: hamishwillee (18 Sep 2012)
Reviewer Approved    Thumbs up icon sm.jpg

If you have to find out the UID of all the application installed on your 3rd edition device then here is the way to do it .

Summary

The following code will display UID of all the application installed on the phone

It uses the following classes:

RApaLsSession iLsSession;
MAppUidObserver& iObserver;
RArray<TAppInfo> iApps;
class MAppUidObserver {
public:
virtual void AppsFoundL(RArray<TAppInfo> aAppList) = 0;
};
       class TAppInfo
{
public:
TInt32 iAppUid;
TApaAppCaption iAppCaption;
};
         void CAppUidViewerEngine::AppsToUiL()
{
TApaAppInfo apaAppInfo;
TAppInfo appInfo;
iApps.Reset();
// Get info on all apps, then iterate through each app
User::LeaveIfError(iLsSession.GetAllApps());
while(iLsSession.GetNextApp(apaAppInfo) == KErrNone)
{
appInfo.iAppCaption = apaAppInfo.iCaption;
appInfo.iAppUid = apaAppInfo.iUid.iUid;
User::LeaveIfError(iApps.Append(appInfo));
}
 
// iObserver.AppsFoundL(iApps);
}

The above snippets will extract the UID of the application and Append it in and Array which will be passed to the view class for display

This page was last modified on 18 September 2012, at 08:58.
45 page views in the last 30 days.