【问题标题】:how to disable(Hide) application icon from SwitchApplication popup screen in blackberry?如何从黑莓的 SwitchApplication 弹出屏幕禁用(隐藏)应用程序图标?
【发布时间】:2011-12-15 06:33:12
【问题描述】:

我正在开发一个包含替代入口点的应用程序。 我在“不在黑莓主屏幕中显示”打勾。在这里它工作正常,它没有在主屏幕上显示图标。但我的问题是

当我从菜单(主屏幕)单击 SwitchApplication 时,替代入口点图标将显示在弹出屏幕上,如下图所示。我不想显示该图标。我想以编程方式隐藏该图标。

请帮助我

【问题讨论】:

    标签: blackberry


    【解决方案1】:

    如果是服务,您可以隐藏应用程序。对于 bb ant 工具,将系统模块 (systemmodule) 设置为 true。 JDE 和 Eclipse 插件也有类似的选项。

    【讨论】:

      【解决方案2】:

      只需将此方法覆盖到我们的应用程序中 喜欢关注

      private static boolean flag=false;
      public static void main(String[] args)
          {
              StartUp startUp;
              if(args!=null && args.length>0 && args[0].equals("gui")){
                  flag=false;
                  startUp = new StartUp("gui");
                  startUp.enterEventDispatcher();
      
              }else{
                  flag=true;
                  startUp = new StartUp();
                  startUp.enterEventDispatcher();
              }
          }
      

      我重写了这个方法

      protected boolean acceptsForeground() {
      
              return flag;
          } 
      

      【讨论】:

        【解决方案3】:

        这是我最终使用的对我有用的代码。我曾尝试将 AcceptForeground 放在我的主启动器类中,但随后将其放在 PushListener 本身中,以防止它出现在正在运行的任务菜单中。工作正常。

        启动器类

        public static void main(String[] args) {
            if (args != null && args.length > 0 && args[0].equals("gui")) {
                MyApp app = new MyApp();
                app.enterEventDispatcher();
            } else {
                PushListener.waitForInstance().start();
            }
        }
        

        PushListener 类

        protected boolean acceptsForeground() {
            return false; // You could use a variable instead if you wanted.
        } 
        

        【讨论】:

          【解决方案4】:

          如果你使用黑莓eclipse插件,那就很简单了。

          打开“blackberry_description_app.xml”,只需检查:不要在黑莓主屏幕上显示应用程序图标。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2010-12-02
            • 1970-01-01
            • 2014-10-28
            • 2013-06-19
            • 1970-01-01
            • 2011-08-26
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多