开发者

Check whether BlackBerry maps app is installed

I want to know wh开发者_运维知识库at API can check if "BlackBerry maps" is installed on a device. I have a BlackBerry application, and I want to call "BlackBerry maps" from this application, or throw an error if "BlackBerry maps" hasn't been installed yet.


Above OS 6.0 you need to check for another code module

int mh1 = CodeModuleManager.getModuleHandle("net_rim_bb_lbs"); // OS 4.5 - 5.0
int mh2 = CodeModuleManager.getModuleHandle("net_rim_bb_maps"); // OS 6.0
if (mh1 == 0 && mh2 == 0) {
   Dialog.alert("BlackBerry Maps not installed");
}


You can use this

m_bbHandle = CodeModuleManager.getModuleHandle("net_rim_bb_lbs");

if m_bbHandle > 0 then the module is installed.

net_rim_bb_lbs is BlackBerry Maps.

Here is the link to the doc

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜