Search code examples
javascriptblackberrygoogle-gears

creating sqlite database with google gears. widget sdk


I have a JavaScript function named "openDatabase()" that starts with:

function openDatabase() {
   try {
       _db = google.gears.factory.create('beta.database');
      ...//more code
  }
  catch(err) {
     alert(err.name + " " + err.message);
  }

i have created my sqlite database with success running on the simulators for the Bold 9700 and Storm 2 9550. When i deploy this same app to a real device(the new torch), an exception is caught with err.name "ReferenceError" and err.message "Can't find variable: google"

why doesn't it know what google is? i am importing these javascript files:

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

Solution

  • Sounds like google gears is not installed - your application should check this