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

Web and WebWorks Development

Reply
Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: BB Torch and sqlite/http connection

Hi bryfox,

 

do you know if the blackberry.simulator.isMassStorageActive is available to standard HTML pages (on BB) or is it just a WebWidget feature?


Alon

Contributor
Posts: 15
Registered: ‎11-01-2010
My Device: Not Specified

Re: BB Torch and sqlite/http connection

It's only part of the Widget APIs. Honestly, I haven't tested any of this out in the browser; are the same problems seen there?

Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: BB Torch and sqlite/http connection

Unfortunately Yes. We get the same errors in the browser. And we dont have a way of checking for MassStorageMode. All we can do is trap the exception and suggest to the user what to do. I really hope that RIM takes care of this issue in some elegant way in the next release.

Contributor
Posts: 15
Registered: ‎11-01-2010
My Device: Not Specified

Re: BB Torch and sqlite/http connection

Good to know. Unfortunately, checking for mass storage mode isn't really a solution for the Widget framework either. In my further tests (see this comment) if the user connects to USB even when the app isn't running, trying to open the database any time after that will throw this exception.

 

As far as I can tell right now, using SQLite in OS 6.0 isn't an option.

 

Out of curiosity, what OS point release are you testing with?

Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: BB Torch and sqlite/http connection

Unfortunately I cant share the release with you because it is a pre-release version of 6 that is available to Blackberry ISVs. I do appologize as I would love to share it but we are under NDA.

 

Its a big call to say that you cant use SQLite but I definitely understand your frustration. Can you think of any other options in 6.0? Gears is no longer supported so I dont see what other options exist.

 

Alon

Contributor
Posts: 15
Registered: ‎11-01-2010
My Device: Not Specified

Re: BB Torch and sqlite/http connection

True, I might be jumping to conclusions... hopefully there's a workaround. I was hoping that this problem was limited to my point release, but it doesn't sound like that's the case. I may try to create a reduced case page and see where that leads me.

 

Not sure what the other options are. This post indicates that localStorage doesn't work reliably. Cookies, depending on the situation. With a widget, it's presumably possible to write an extension that works with the native Persistent Store.

Contributor
Posts: 15
Registered: ‎11-01-2010
My Device: Not Specified

Re: BB Torch and sqlite/http connection

For what it's worth, workaround-wise, I ran a test using cookies (setting a 1-yr cookie with PPK's code). The cookie values don't survive a device restart in a widget app, though that doesn't seem to be a problem in the browser.

 

Tested on my same Torch (bundle 278; 6.0.0.141).

Developer
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: BB Torch and sqlite/http connection

[ Edited ]

I ran into this problem today after I used Desktop Manager to restore my device. I had to re-format the SD card to get my app working again. 9700 running OS 6.0.0.666

 

Can't rely on SQLite in OS6 and can't use localStorage in OS5? What's next?

Trusted Contributor
Posts: 119
Registered: ‎11-28-2011
My Device: 9930
My Carrier: Verizon

Re: BB Torch and sqlite/http connection

RIM, do you have any comments on  the durabilty of the database based on the concerns raised here?

This would seem to be a very critical fault.

Developer
Posts: 60
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: BB Torch and sqlite/http connection

I also would be interested.