BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-25-2008, 04:50 PM   #1
radski
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Default Distribute data with application

Please Login to Remove!

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.
Offline  
Old 03-26-2008, 03:41 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

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.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 03-26-2008, 03:59 AM   #3
radski
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Default

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.
Offline  
Old 03-26-2008, 10:08 AM   #4
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

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.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 03-26-2008, 04:17 PM   #5
radski
New Member
 
Join Date: Oct 2006
Model: 8700
Carrier: Voda
Posts: 10
Default 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

radski
Offline  
Old 03-26-2008, 05:11 PM   #6
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

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.
__________________
Do your homework and know how to ask a good question.
Offline  
Old 04-09-2008, 07:31 AM   #7
lionscribe
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: none
Carrier: sprint
Posts: 24
Default

Wirelessly posted

Quote:
Originally Posted by richard.puckett
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.
I would do as Richard advises, but I would compile it separately as a library, thus having 2 cod files. Then when you have to update, you only update the library, thus avoiding a complete reinstall with a possible reset.
Lionscribe
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Blackberry Advertising Banner Vinyl Mesh Sign Fruit Vegetable Berry Farm Fresh picture

Blackberry Advertising Banner Vinyl Mesh Sign Fruit Vegetable Berry Farm Fresh

$179.95



FARM FRESH BLACKBERRIES CLEARANCE BANNER Advertising Vinyl Flag Sign AAA picture

FARM FRESH BLACKBERRIES CLEARANCE BANNER Advertising Vinyl Flag Sign AAA

$168.54



Vintage RIM Blackberry R957M-2-5 with Belt Clip picture

Vintage RIM Blackberry R957M-2-5 with Belt Clip

$17.99



Little Trees 67343 Blackberry Clove Hanging Air Freshener for Car/Home 6 Pack picture

Little Trees 67343 Blackberry Clove Hanging Air Freshener for Car/Home 6 Pack

$8.99



SFT DONGLE for Samsung Xiaomi Blackberry Sony SMART FLASHER TOOL NEW picture

SFT DONGLE for Samsung Xiaomi Blackberry Sony SMART FLASHER TOOL NEW

$155.72



Little Trees 67343 Blackberry Clove Hanging Air Freshener for Car/Home 144 Pack picture

Little Trees 67343 Blackberry Clove Hanging Air Freshener for Car/Home 144 Pack

$94.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.