Distribute data with application
Hello,
excuse my newbie and hopefully trivial question. What's the best way to distribute large chunks of structured textual data (think plain text CSV files, tables or xml etc.) with a BB application that 4.1 and earlier compatible? Do it in code? This would mean an app recompile with every new version of the data set - not a big issue - but isn't there some more efficient way of doing this? Thanks, R. |
how would you read the data in? the bigger your data are the better would be a kind of compression, maybe using the zip-algorithm some company implemented a few weeks ago.
|
Indeed, that's part of my question, compression would obviously be suitable for large sets of lexical data, but that's veering off the original question.
Is there anybody who implemented a dictionary or something similar? My app is not that different from that. |
Is there a reason that you need to ship the data with your app? When I hear "strutured" I think XML (I'm one of those people who actually like XML). Could you not host your data on a web server somewhere and download it to your app over http? Pull it down as part of an initialization process and then periodically check for updates.
|
Just a simple text file(?)
Hello Richard,
thanks for the reply, I too like structured data (sorry to say, I'm not a massive fan of XML for its bulk and lack of readability). I'd like to avoid live data transfers, some people still get charged per MB, and the data is sufficiently static to warrant a reinstall when they do get updated. In my opinion it also makes it easier to distribute the app (something about fewer moving parts...) So any takers on how to bundle up data into the project? I can almost see end is nigh for MyTextAndData.java :razz: radski |
I'm certainly a fan of having fewer moving parts as long as that really does keep the app simpler (and what with all the issues related to BlackBerry networking that might just be the case here).
So if you want to distribute data with the app you could put your data files into a resources folder (for convenience) and include those files on your rapc command line. Then, in code, use Class.getResourceAsStream(String) to get an InputStream. This is how I handle shipping configuration information in my apps. |
Wirelessly posted
Quote:
Lionscribe |
All times are GMT -5. The time now is 06:17 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.