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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Trusted Contributor
WorkHorse
Posts: 100
Registered: ‎01-13-2012
My Carrier: Simulator
Accepted Solution

Starting in the Background

The API doc states:

 

You can start the application from an icon and also run the background start page when the device starts and when the application is installed.

  
<content src="index.html" >
   <rim:background src="listener.html" runOnStartup="true" />
</content>

Does this mean that there will be a background process of listener.html that runs on startup, and the foreground content (the app itself) is based off of index.html? I'm confused by this tag, any explanation would be helpful.

 

Thanks!

 

Please use plain text.
Developer
rorybarnes
Posts: 214
Registered: ‎01-07-2011
My Carrier: Rogers

Re: Starting in the Background

Correct.

listener.html would run on device start-up, when your app is launched it would launch index.html
--
Rory (@roryboy)
Click "Accept as Solution" if post solved your original issue. Give like/thumbs up if you feel post is helpful
Please use plain text.
Developer
eblade
Posts: 161
Registered: ‎02-08-2012
My Carrier: None yet

Re: Starting in the Background

That's a good tag to know about. Where's the documentation on this held? I thought I'd read through everything related to this, but I guess I missed that.

Also, anyone know of a way to launch a particular thing at specific intervals, other than setting up a background like above, and having it run an interval?

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 537
Registered: ‎07-15-2008
My Carrier: Bell

Re: Starting in the Background

There's documentation here: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/rim_background_element_1265316...

 

This is only on the smartphone today, and this is the only way to make something autostart with WebWorks, but once you've done this, you can do whatever you want - run a timer or an extension. If you are going to extend something to make regular periodic events, you should look at RealtimeClockListener in the Java API.

Tim Windsor
Application Development Consultant
Please use plain text.