I am studying blackberry webworks. I have done one demo, where there is one page that run in background and is loaded on device startup. I have used blackberry rim:background to specify background, and has started interval in background page, but the page is not working. Please help me in getting out of this problem,
Here is my code in config.xml
<content src="index.html" >
<rim:background src="index.html" runOnStartup="true" charset="string" />
</content>
And HTML code Insert title here
<script type="text/javascript" src="timer.js" />
<script>
function background()
{
self.setInterval(interval,"3000");
}
function interval()
{
i=i+10;
}
}
</script>
<body onload=" background()" >
</body>
</html>
Thanks in advance!
which phone/OS are you looking to target with this sample? The background element of the config.xml is a little bit different for a BB10 app, than it is for OS 5-7.
For BB OS 5-7 you would do this just like you have above
<content src="index.html"><rim:background src="listener.html" runOnStartup="true" /></content>
I would check-out the sample config.xml documents over here, and make sure everything is setup properly to start with.