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
Contributor
chiunyi
Posts: 20
Registered: ‎04-11-2011
My Device: bold9000

Need help on start page

Photobucket

 

 

this is my config.xml file 

i need to start my widget in background on boot up device, and when i clicking on the home screen icon it will bring my widget that run on background into foreground .But it didn't ,it run my widget twice... : ( 

So anybody have an idea on this problem plz advice me T___T  

Please use plain text.
Developer
agungeddy
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Need help on start page

[ Edited ]

You should implement the Javascript requestBackground and requestForeground method. See the reference:
http://www.blackberry.com/developers/docs/webworks/api/blackberry.app.html
http://www.blackberry.com/developers/docs/webworks/api/blackberry.app.event.html

Please use plain text.
Contributor
chiunyi
Posts: 20
Registered: ‎04-11-2011
My Device: bold9000

Re: Need help on start page

Don't work....: (

I addded this code on but it still run my widget twice(the first one from boot up and the second one from i clicking home screen icon) 
------------------------------------------------------------------------------------------
blackberry.app.event.onForeground(onForegroundCallback);
function onForegroundCallback(){

blackberry.app.requestForeground();

} 

------------------------------------------------------------------------------------------

if u have any code that worked on u ,plz show me Y^Y 

Please use plain text.