要获得黑莓模块名称 [英] To get the module names in blackberry

查看:102
本文介绍了要获得黑莓模块名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我已经安装在黑莓应用程序模块的名称,就像消息,联系人等我怎样才能得到它现在正在运行该模块的名字呢?

I want to get the application module name I have installed in Blackberry, just like "Messages","Contacts" etc. How can i get this module's names which are running now?

推荐答案

检查以下code片断:

Check following code snippet:

//get the ApplicationManager
ApplicationManager appMan = ApplicationManager.getApplicationManager();

//grab the running applications
ApplicationDescriptor[] appDes = appMan.getVisibleApplications();

int size = appDes.length;
for (int i = size - 1; i >= 0; --i) {
    String moduleName = appDes[i].getModuleName();
    String name = appDes[i].getName();
    // other codes....
}

结果
也可以参考API文档以下类:


Also read the API documentation for following classes:


  • <一个href=\"http://www.blackberry.com/developers/docs/4.0.2api/net/rim/device/api/system/ApplicationManager.html\"相对=nofollow> ApplicationManager

<一个href=\"http://www.blackberry.com/developers/docs/4.0.2api/net/rim/device/api/system/ApplicationDescriptor.html\"相对=nofollow> ApplicationDescriptor

<一个href=\"http://www.blackberry.com/developers/docs/4.7.0api/net/rim/device/api/system/$c$cModuleGroupManager.html\"相对=nofollow> codeModuleGroupManager

<一个href=\"http://www.blackberry.com/developers/docs/4.7.0api/net/rim/device/api/system/$c$cModuleGroup.html\"相对=nofollow> codeModuleGroup

这篇关于要获得黑莓模块名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆