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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 237
Registered: ‎07-20-2010
My Device: Not Specified

my app closes before it opens the browser, why?

I am making a tiny app which just opens the browser to a web app.  When it runs the first time it seems to skip the open browser code and jump to the exit command.  After that however it works as expected.

Code in my index.html header:

 var args = new blackberry.invoke.BrowserArguments('http://www.mysite.com/wap');
    blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
    blackberry.app.exit();
	</script>

 Thats all this app is meant to do, open the browser to a given page and quit.  Is there a better way to make such apps for BB devices?  On iOS users can make their own webclips and I just have to put a  few html tags  to dess them up right  such as hiding browser bars - can I hide browser bars when programmatically opening the browser on the BB?

 

PS: Such as by pointing my config content element at the website - but won't doing that open the site inside my app rather than in the browser - difference being the browser seems to perform better but the app will not have the browser bars.

thanks

Developer
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: my app closes before it opens the browser, why?

Could be caused by race condition - your exit is being hit right away before the invoke call can complete. Try setting the app to exit after 5 seconds to check:

 

setTimeout("blackberry.app.exit", 5000);

 

Developer
Posts: 237
Registered: ‎07-20-2010
My Device: Not Specified

Re: my app closes before it opens the browser, why?

where would I put that line?