Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
jmace
Posts: 482
Registered: 10-24-2008
My Carrier: AT&T

Re: Gears create table stopping widget

Yes, I have the gears_init.js referenced in my index.html file and it occurs before the calling of the method I am having the create table issue in.

 

<script type="text/javascript" src="scripts/gears_init.js"></script>

 

_________________________________________
www.jasonmace.com/blackberry
Please use plain text.
Developer
jmace
Posts: 482
Registered: 10-24-2008
My Carrier: AT&T

Re: Gears create table stopping widget

As an update, I tried to run my Widget in Chrome and I've been successful.

_________________________________________
www.jasonmace.com/blackberry
Please use plain text.
New Developer
sibbaldl
Posts: 41
Registered: 06-22-2010
My Carrier: N/A

Re: Gears create table stopping widget

Hi Adam

 

 


astanley wrote:

Hello,

 

This may be expected behaviour, depending on which BlackBerry Smartphone model you are using.

 

There is currently a design limitation with the underlying SQLite API used to implement the Gears DB.  The file system type of the internal memory on a BlackBerry Smartphone is not compatible with SQLite.  As a result, this API requires that the device has either eMMC or an SDCard.  This design limitation affects Java applications as well.

 

More details about this behaviour can be found here:

 

http://www.blackberry.com/developers/docs/widgetapi/google.gears.database.Database.html

 

Sincerely,

Adam

 


 

It sounds to me like for simple requirements the best chance one has of storing something to the device is using the file.io functions. Would you agree? Are there any watchouts that I should be aware of here though? Security of the contents of a flat file springs to mind for one...

 

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
=============================
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Gears create table stopping widget

Hi Lee,

 

99.9% of all BlackBerry's ship with an SD Card included from the wireless provider.  So chances are very good that an SD card is present.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
sibbaldl
Posts: 41
Registered: 06-22-2010
My Carrier: N/A

Re: Gears create table stopping widget

Hey Tim

 

Cheers for the response; thing is, even if it were true that most all devices ship with an SD card there's no guarantee that a) they'll be in the device from one day to the next (it's very likely, but not guaranteed), b) that they'll have enough free space to store the DB files and c) that they won't be swapped out for another card and taking the DB with them.

 

As a lowest-common-denominator approach it seems to me saving out details to the internal memory as a flat xml file is the way to go. Sure point b) applies in this scenario too, but at least that's the smaller of the issues to deal with.

 

I'd appreciate any further thoughts you have on this approach. Any particular reason why saving to internal memory for persistence storage should be avoided or overlooked?

 

NB in my case I've decided not to save passwords to the file, thereby only saving out insensitive data. 

 

Thanks again

 

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
=============================
Please use plain text.