12-05-2010 02:12 PM - edited 12-05-2010 02:13 PM
I working on my first widget using Eclipse. It's really not a complicated widget. What I want to do is when the widget loads to open the default BB browser and load a weblink immediately. Once the browser loads the widget should die.
Can anyone help me out?
12-05-2010 04:16 PM - edited 12-05-2010 04:17 PM
1) The Web Development forum is a better place to post:
2) Here is your code:
WSER, args); blackberry.app.exit(); </script>
09-01-2011 01:35 PM
I have tried your solution but on my BOLD 9700 the result is that the browser remain in background, if I remove
the blackberry.app.exit(); line the browser remains visibile but on back the screen of my widget appear.
How can I launch the browser and die my widget while leaving the browser in foreground?
May I register the callback for the onForeground event after invoking the browser in order to close the widget as soon as it comes back visible?
09-01-2011 05:11 PM
I am a little confused by this requirement, so to clarify.
All you want is to have an icon on the Blackberry. When the icon is pressed, a Web page is loaded in the standard Browser, then your application dies?
If that is correct, then you can write a very small java application, in it you will just start the Browser using this KB article.
Take you application to the background
Then start a Thread, that stalls for 5 seconds, and then issues a System.exit().
Job done I think.
09-03-2011 04:11 AM
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig(); myBrowserFieldConfig.setProperty(BrowserFieldConfi
g.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_POINTER); BrowserField browserField = new BrowserField(myBrowserFieldConfig); browserField.requestContent("your URL");