You Are Here:

Community: Wiki

This page was last modified on 1 November 2009, at 13:35.

Get list of installed applications and its UID in Qt

From Forum Nokia Wiki

Reviewer Approved   


ID ... Creation date June 22, 2009
Platform S60 3rd Edition, FP1, FP2
S60 5th Edition
Tested on devices Nokia 5800 XpressMusic
Category Qt for Symbian Subcategory


Keywords (APIs, classes, methods, functions): XQInstaller::applications()

Overview

This code snippets shows how to get name and UID of installed applications on device. The XQInstaller class provides information about the installed applications.

This snippet requires TrustedUI capabilities. Self-signing is not possible because a Developer Certificate is needed.

Preconditions

Headers required

#include <XQInstaller>

.pro file

symbian:LIBS += -lswinstcli \
-lcommdb \
-lapparc \
-lefsrv \
-lapgrfx
symbian:TARGET.CAPABILITY += TrustedUI

Source

void GetInstalledApps::GetApps()
{
XQInstaller* m_installer = new XQInstaller(this);
 
/* Get List of applications.
* type of m_applications is QMap<QString, uint>.
*/

m_applications = m_installer->applications();
 
/* Get List of application names
*type of m_appNames is QList<QString>
*/

m_appNames = m_applications.keys();
 
/* Get List of application UID in decimal.
*type of m_appUID is QList<uint>
*/

m_appUID = m_applications.values();
 
ui.listWidget->clear();
for (int i = 0; i < m_appNames.count(); i++)
{
QString str;
/* convert UID from decimal to hex and then string. */
str.setNum(m_appUID.at(i),16);
/* append name and UID to string */
QString string(m_appNames.at(i)+" UID:"+ str);
/* append string to list widget to display on screen */
ui.listWidget->addItem(string);
}
 
/* Let's make the UI scale so that we can scroll it. */
QScrollArea* scrollArea = new QScrollArea;
scrollArea->setWidget(ui.listWidget);
scrollArea->setWidgetResizable(true);
 
/* setCentralWidget() takes ownership of scrollArea and deletes it at the appropriate time. so no need to delete scrollArea */
setCentralWidget(scrollArea);
}

Postconditions

The code snippet is expected to show a list of all installed applicationa with its UID.

Image:GetAllInstalledApps.JPG

Code Example

  • The Code Example will show a list of all installed application with UID. The application is tested on Nokia 5800 XpressMusic.

Related Links

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fCS001424E5fE2dE5fUsingE5ftheE5fE44E45PE4cOYME45NTE5fkeywordE5finE5faE5fE51tE5fpackageE5ffileX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZE71tQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZuserE5ftagQSxE71tX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ