11-30-2011 12:35 PM
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_BRO
WSER, 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.
11-30-2011 03:05 PM
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: