Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
miamon
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10

Re: 2 icons appears: requestBackground, runOnStartup

Hi Tim, just download 2.1 SDK for Smartphones and recompiled my app and the bug is still here. :smileysad:

My app run on install and reboot, and when i click to the app icon an other instance is opened.
Josep Maria
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: 2 icons appears: requestBackground, runOnStartup

The team is looking into it... we are planning another release soon as well that we may be able to pick this up.  I had thought it made the cut for this release.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
chiunyi
Posts: 20
Registered: ‎04-11-2011
My Device: bold9000

Re: 2 icons appears: requestBackground, runOnStartup

tneil the next release can we have a red flash light and beep when have an incoming push message?

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: 2 icons appears: requestBackground, runOnStartup

It looks like one of our developers has found a fix for the 2-icons issue.  I've asked for him to summarize it for me so that I can post it next week.  It looks like it will be a fairly simple change in the template code that is shipped with the SDK.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
miamon
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10

Re: 2 icons appears: requestBackground, runOnStartup

Awaiting your news Tim for next week. Thanks a lot.

Josep Maria
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: 2 icons appears: requestBackground, runOnStartup

Ok.. so here's the skinny :smileyhappy:

 

If you open up your Widget.java file (typically found at <InstallDir>/device_templates/blackberry/web/widget) you will find a method in there called makeDebugArgs().

 

This code is used for debugging 5.0 devices with use of the Eclipse/Visual Studio plug-ins and is the cause of the 2 icons.  If you comment out the contents of this method the 2 icons should disappear

 

private static void makeDebugArgs( String[] args, WidgetConfigImpl wConfig ) {
        // Makes modifications to the args to support debugging logic
//        if( !wConfig.isDebugEnabled() ) {
//            args[ 0 ] = DEBUG_ARGUMENT;
//        }
}

 

Of course, if you are using the WebWorks plug-ins for Eclipse and Visual Studio, this will likely have an effect on the ability to debug your JavaScript on BlackBerry 5.0

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
miamon
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10

Re: 2 icons appears: requestBackground, runOnStartup

Hi Tim, 

 

i have this code in this function:

 

  private static void makeDebugArgs( String[] args, WidgetConfigImpl wConfig ) {
        // Makes modifications to the args to support debugging logic
        if( !wConfig.isDebugEnabled() ) {
            args[ 0 ] = "WIDGET;";
        }
    }

 is not exactly the same. 

 

is this correct?

Josep Maria
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: 2 icons appears: requestBackground, runOnStartup

Which version of the SDK do you have 2.1???

 

You will want to comment all the code in that method

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
miamon
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10

Re: 2 icons appears: requestBackground, runOnStartup

Yes 2.1

 

Just commented and seems now works fine. Thanks!!

Josep Maria
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: 2 icons appears: requestBackground, runOnStartup

As an FYI.. this has been updated in the next release of the WebWorks SDK so that you won't have to make this change again :smileyhappy:

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter