I need to embed a > 4MB Content File in a BlackBer

2019-05-14 06:18发布

问题:

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 [ cannot exceed 127 ] or absolute size of the application)?

回答1:

Doesn't look like it: http://supportforums.blackberry.com/t5/Testing-and-Deployment/The-maximum-size-of-a-BlackBerry-smartphone-application/ta-p/1300209

Specifically this:

The limit for the number of sibling COD files that can exist within a single application is 127. This means that the maximum theoretical size limit for an application would be 16256 KB, which consists of 8128 KB of application data and 8128 KB of resource data. There is some overhead to this value, which brings the actual maximum size limit closer to 14000 KB. The actual maximum size for an application will vary slightly based on the application's contents.

It is not possible for either data type (application or resource) to make use of unused space of another data type, meaning resource data cannot use application data space even if the application data is well under the limit.