02-01-2012 03:53 PM
is it possible that "onload" in the body section is only executed when the app is actually opened?
What I noticed is when the device is restarted and the app is started after the booting process then I need to open the app before anything is working. Is this as designed?
Solved! Go to Solution.
02-02-2012 03:33 PM
I believe you need to add
<rim:background src="listener.html" runOnStartup="true" />
to your config.xml where the filename is the file you want to have running in the background.
More details at:
02-09-2012 08:57 AM
good point. I will give it a try
But is it the same page when you request the application to come to the foreground?
02-09-2012 09:02 AM - edited 02-09-2012 09:03 AM
I believe the best practice is to have a separate page that just contains and runs the JS functions you need to run in the background at startup. Less overhead on the system.
if you use the same functions on start-up that you use in your app you can just put them all into a JS file and include that on each html page. That way the functions aren't duplicated.