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 04:33, 9 August 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

获得MIDIet图标

From Wiki
Jump to: navigation, search
Article Metadata

兼容于
文章
翻译:
hoolee
最后由 hamishwillee 在 09 Aug 2013 编辑
  • 详细描述

这篇文章描述了如何获取已安装的Java MIDIet的程序图标。


根据MIDP 2.0特性,MIDIet图标必须包含在JAR中,如JAD文件中用到的MIDIet<n>属性。“JAR中的图标必须使用PNG图片,路径为大小写敏感的绝对路径”

因为JAR已经包含了图标,因此无法从文件中获取图标信息,但可以用MAknsSkinInstance从S60菜单获取MIDIet图标\

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)
);
}
}
This page was last modified on 9 August 2013, at 04:33.
161 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.

×