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
Highlighted
New Developer
Posts: 2
Registered: ‎06-18-2012
My Device: Curve 9300
My Carrier: Safaricom

I need to embed a > 4MB Data file in a Webworks application. What are my options?

I am in the process of developing a content-heavy Webworks app. In order for the app to be useful, it needs to maintain a local content database ( approx. 4MB in SQL form; the only way to reduce it further is to rip out entire categories of content ).

 

My original thinking was that I would embed the SQL file in the app ( just like the CSS and JS ), then load into SQlite on first run. The strategy worked in development on the Ripple emulator.

 

When I attempted to build and run on a real test device, grief resulted. The compiled COD had > 127 sibling CODs, so it wouldn't install ( took a week to find that out ). 

 

I have prototyped a different approach - downloading the SQL file from the web on first run. I do not like this second approach - with reason; this application is intended for use in a zone of the world that has expensive / spotty bandwidth.

 

Is there a way to embed significant amounts of content in a BlackBerry application for BB 6/7 without running into application size limits ( either number of Sibling CODs or absolute size of the application )?

Developer
Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: I need to embed a > 4MB Data file in a Webworks application. What are my options?

Hi, you cannot have more than these limit COD.

 

1) In Java you can create another project and import the data from it. But it implies the user must install both applications. And I do not know if it can be done in Webworks without javascript extensions.

 

2) If your data take only 4MB, you should have 3Mb left for your code, at least. Can't you optimize your images and so on, to fit in the size limit?

 

3) You can force the connection to Wifi in your app with:

<rim:connection timeout="25000">
<id>TCP_WIFI</id>

Regular Contributor
Posts: 68
Registered: ‎06-12-2012
My Device: Blackberry Bold 9780
My Carrier: Vodafone

Re: I need to embed a > 4MB Data file in a Webworks application. What are my options?

Does the force connection work with the playbook? Its not document very well... Is there any examples you could provide having some issues testing it on the playbook.... Thanks again
Developer
Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: I need to embed a > 4MB Data file in a Webworks application. What are my options?

No it works only on Blackberry smartphones. But playbook connect through Wifi only, so you should not be charged

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: I need to embed a > 4MB Data file in a Webworks application. What are my options?

Yes, unfortunately there is a 7Mb COD limitation in the Blackberry Java platform  which is why you ran into this wall - another great reason why evolving to the QNX platform will greatly benefit developers (no limit - you could build a 2Gb app if yo uwanted).

 

Your users will stil need to download 4Mb+ of content - whether you are downloading it in chunks from within the app, or if you have embedded it within the app, and they are downloading it from App World. 

 

It would suggest using both strategies - embed as much of that static content as possible within the app (perhaps focusing on content that is most important) and then build an "update" process into your app where it downloads and refreshes the local cache with current data.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.