开发者

Check whether BlackBerry maps app is installed

开发者 https://www.devze.com 2022-12-30 15:29 出处:网络
I want to know wh开发者_运维知识库at API can check if \"BlackBerry maps\" is installed on a device.

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

精彩评论

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