如果通过Java代码restart BlackBerry

感谢Damon同学无私共享经验!!


下面的代码做了两件事情:

1) 判断已经安装了某应用,比如GooNuu

2) 如果安装了,那么提示用户restart blackberry
      
      // Retrieve a handle for a module.
      int handle = CodeModuleManager.getModuleHandle("GooNuu");
                   
      if (handle == 0 ) {
         informModal("GooNuu not installed");
      }else {
          informModal("GooNuu already installed, would prompt you to restart");
          CodeModuleManager.promptForResetIfRequired();
      }
   


你可能感兴趣的:(java,BlackBerry)