Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 06:24, 27 November 2007.

How to discover all installed applications

From Forum Nokia Wiki

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:

CDesCArray* CMyClass::GetApplicationsL(void)
{
	CDesCArrayFlat* MyArray = new(ELeave)CDesCArrayFlat(10);
	CleanupStack::PushL(MyArray);
	
	RApaLsSession ls;
	User::LeaveIfError(ls.Connect());
	CleanupClosePushL(ls);
	
	User::LeaveIfError(ls.GetAllApps());
 
	TInt Errnono(KErrNone);
	TApaAppInfo AppInfo;
	
	do
	{
		Errnono = ls.GetNextApp(AppInfo);
		if(KErrNone == Errnono && AppInfo.iCaption.Length())
		{	
			MyArray->AppendL(AppInfo.iCaption);
		}
 
	}while(KErrNone == Errnono);
	
	CleanupStack::PopAndDestroy(); // ls	
 
	CleanupStack::Pop(MyArray);
	return MyArray;
}

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.

 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX