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

Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Can the PUSH APIs be used to pre-load webworks content?

My approach to webworks has so far been to view it as just another app development platform that lets you use HTML/CSS/Javascript instead of java for client-side applications that don't really require an deep device side functionality.  My view has been that the files are all more-or-less static and are part of the application that gets installed. The fact that it runs in a browser shell and has HTML files was almost secondary; like I said, it's just another development language.


Anyway, I find my world opened up a bit and starting to think about a more dynamic environment and unsure of whether WebWorks and the PUSH API can be used to achieve it.


For an app I'm looking at developing, I need the contents of a page to be updatable by a server of some kind. I'm not thinking about creating a web service and pulling HTML fragments with AJAX calls. Instead I'm thinking of replacing a page completely with a new version being pushed to the device using the Push APIs. Will this work? I don't want to require the application to be running when the push call comes in. Instead I'd like the page pushed and pre-loaded on the device so when the app starts it simply displays the page that was pushed.


Maybe this is a stoopid noobie question, but is this possible? If not, is there another approach to fetching dynamic content without using a web service call or simply referencing the page on the server directly? I'd still like the app to function off-line and not require connectivity.



Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Can the PUSH APIs be used to pre-load webworks content?

I could be wrong but i think you would have to have the app loaded as that becomes the listener for any push messages being sent.. You can tweak the config to start the application at power-on / install...


I think push had an 8K data limit or something like that (again i could be wrong) so you might need to just use push as a notification to go fetch some content from a web service... i.e. isntead of polling a web service the push would say what to go and fetch, from where etc so you app just goes and does it and then displays it.

Posts: 189
Registered: ‎08-13-2008
My Device: Not Specified

Re: Can the PUSH APIs be used to pre-load webworks content?

Hi Guys


We have created such an app before, yes it is possible.

We used BES only.


But...we have done this using a standard HTML, Javascript, CSS based app NOT webworks.

We wrote a server side program which pushes the HTML pages + JS + CSS files etc to the browser cache.

This way when the user goes to the url the next time all pages have been updated.


** note ** in the latest 6.0 devices the JS and CSS files do to NOT get updated if the file is in the cache already!!!! ONLY HTML files (another RIM gem)


There is a file size limit for pushed content, but this is configurable on the BES.


We have had some issues with regards pushing a large number of files (approx > 30) to the BES in a single push process. The BES has issues handling all the files hitting it in quick sucession.

Our solution was to add a 1 second delay before pushing each file, that way the BES can handle it.


I'm not sure about doing it with a webworks app, I can't see why not though.