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
Contributor
Posts: 16
Registered: ‎10-07-2010
My Device: Not Specified

Sample code for sqlite for blackberry widgets

Hello,

 

I am having trouble getting the sqlite to work on my blackberry widget.

I found a demo online, and I tried to copy it, but it didn't work as well.

I found little resources online, and I am stumped how to begin.

I put bits and pieces of information together, but somehow I can't get things to work properly.

 

Fist of all:

 

<script type="text/javascript" src="/js/html5_init.js" id="html5_init"></script>
    <script type="text/javascript" src="/js/html5_worker.js"></script>

what is the purpose of this? to make html5/gears work in version 5.0?

 

 

Second of all, I found this in the sample code

 

    <script src="http://www.google.com/jsapi?key=ABQIAAAA1o74CLmvcPnl2Fbx4sOymBQfEs8_TczC0WHTxzaWv64C1qm3GBTO0qQp2PNQ..." type="text/javascript"></script>  
    <script src="Scripts/action.js" type="text/javascript"></script>
    <script src="Scripts/gears_init.js" type="text/javascript"></script>

 

I see that it's implementing google js api, action.js, gears_init.js.. Do I need all 3 of those to make it work? If yes, it wouldn't work offline?

 

Lastly, I can't find a working sample code for sqlite, and all the articles on the net are jumbled up saying stuff like "google gears depreciated"

 

I feel slightly stumped developing blackberry apps, the learning curve, cross-device compatibility issues, and lack of documentation on line... =(

Retired
Posts: 10
Registered: ‎01-29-2009
My Device: Torch

Re: Sample code for sqlite for blackberry widgets

Hi tpae,

 

Here's a recent topic on the forum asking the same question as you raise:

 

http://supportforums.blackberry.com/t5/Web-Development/OS5-HTML5-to-Gears-openDatabase-fails-Databas... 

 

Also, there is a full WebWorks weather sample application that uses the HTML5 Database functionality included as an attachment to a knowledge base article that should help you.  NOTE: If you're not using Eclipse or Visual Studio you can obviously skip the instructions in the knowledge based article on that.  Here's the link to the article and source code:

 

http://supportforums.blackberry.com/t5/Web-Development/Sample-Code-Weather-application/ta-p/589884

 

 

 

Adam Abramski
Product Manager for WebWorks Platform
Handheld Division