Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 13:08, 13 January 2009 by Forum Nokia KB (Talk | contribs)

Retrieving the icon of a MIDlet using Symbian C++

From Wiki
Jump to: navigation, search


Template:KBTS

Article Metadata
Tested with
Devices(s): Nokia N96, Nokia N95, Nokia E71
Compatibility
Platform(s): S60 3rd Edition FP1, S60 3rd Edition FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
Article
Keywords: RApaLsSession, TApaAppInfo, MAknsSkinInstance, AknsUtils
Created: (13 Jan 2009)
Last edited: Forum Nokia KB (13 Jan 2009)

Overview

This article explains how to retrieve the icon of an installed Java MIDlet.

Description

According to the MIDP 2.0 specification, the icon of a MIDlet must be included inside the JAR only, for example regarding the MIDlet-<n> attribute used in the JAD file. "Icon is the case-sensitive absolute path name of an image (PNG) within the JAR for the icon of the nth MIDlet."

Because the icon is included inside the JAR file, there is no way to get the icon information from the file, but MAknsSkinInstance can be used to get the MIDlet icon from the S60 menu.

Solution

 RApaLsSession iApaSession;
TApaAppInfo appInfo;
iApaSession.GetAllApps();
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
for(TInt i= 0; i < iAppCount; i++)
{
iApaSession.GetNextApp(appInfo);
//Filtering through the list to get Midlets from the list of applications
if(appInfo.iFullName.Right(8).Compare(_L(".fakeapp"))==0)
{
appInfo.iFullName; //Gives Name of the Midlet
appInfo.iUid; //Gives Uid of the Midlet
TRAPD(Err,
CFbsBitmap* midletIcon, midletIconMsk;
AknsUtils::CreateAppIconLC(skin,
appInfo.iUid,EAknsAppIconTypeList,
midletIcon,
midletIconMsk);
 
// midletIcon and midletIConMsk has the Icon and Mask respectively.
(Print them to see the icon)
);
}
}

Related article:

46 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.

×