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.
Retrieving the icon of a MIDlet using Symbian C++
This article explains how to retrieve the icon of an installed Java MIDlet.
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.
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
for(TInt i= 0; i < iAppCount; i++)
//Filtering through the list to get Midlets from the list of applications
appInfo.iFullName; //Gives Name of the Midlet
appInfo.iUid; //Gives Uid of the Midlet
CFbsBitmap* midletIcon, midletIconMsk;
// midletIcon and midletIConMsk has the Icon and Mask respectively.
(Print them to see the icon)