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

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified
Accepted Solution

Bundle a database?

I'd l ike to bundle a sqlite database with my app.  I've seen where I can open a database from an SD card.  Is it possible to open it from the set of files bundled with the app?

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bundle a database?

According to the API,

"Note: A SD card is the preferred storage for databases, currently Storm and Bold are the devices that can create databases with internal memory"

By internal memory I presume they mean the //Store location.

 

You could do what the OS 5.0 demo does and copy a database from a file shipped in the cod onto the SD Card and process from there. 

Developer
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bundle a database?

Thanks Peter - I missed that before when I looked at that demo.

 

It's a shame that database use is still limited to SD Card or "certain devices".  I read on another thread that not all Storm's and/or Bolds have the right kind of internal memory.  I guess I'll end up using a persistent store again...[sigh]

 

Anyways, thanks again.

New Developer
Posts: 41
Registered: ‎06-22-2010
My Device: N/A
My Carrier: N/A

Re: Bundle a database?

Hi skicson

 

By "persistent memory" I presume you are referring to a flat file using file.io methods, yes?

 

I'm in a situation where I'm targeting Device 5.0 smartphones only for my widget, and was going to use the SQL Lite approach until I read about the limitations of the memory. Now I'm not sure what to do. I certainly don't want a mongrel approach where SQL Lite is used for some devices and a flat file for others, leading me to conclude that a flat file is the way to go. But then I'm concerned about security (I'll be storing passwords), meaning I have to figure out how to encrypt or otherwise protect the file contents. Also is it guaranteed (space providing) that storing a flat file internally will always work (i.e. none of this "certain devices" business)?

 

Suddenly it's not as easy as it first looked. Smiley Sad

 

Did you end up using a flat file? Did you need to emply any form of file/content protection? Any advice on this would be appreciated

 

Cheers!

 

Lee

=============================
Win 7 (32bit)
Eclipse Galileo
BlackBerry Web Plug-in
Version: 2.0.0.201003191451-33
BlackBerry Widget SDK
Version: 1.0.0.201003191451-126
=============================