adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

phonegap database API

I'm trying to create a local database and understood this can be done with phonegap API http://docs.phonegap.com/en/1.2.0/pho...

but what should be the object prefix for the methods? for example:
if i want to open a database i'm suppose to use this
var dbShell = window.openDatabase(name, version, display_name, size);

but the window object is not recognized in tiggzi so what should it be?

Thanks
Adi

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

phonegap database API

How do you test the app in browser (mobile) or as a hybrid app?

I'm guessing the window object is not recognized in the app, not in Tiggzi (it's just the IDE).

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

phonegap database API

test in browser

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

phonegap database API

Yes, won't work. PhoneGap API is only available when running on the actual device (as hybrid app).

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

phonegap database API

so same code tested on the device will work? how about IOS?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

phonegap database API

Yes, should work on iOS and Android.

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

phonegap database API

Max, i've installed on the android device. something is not working, what is the procedure to debug it (other then Alert("bla bla")

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

phonegap database API

If you use console.log(...), using Tiggzi Mobile Tester launch the app in Debug mode. You should see the messages in Log View tab.

adi
Posts: 0
Joined: Tue Jun 26, 2012 8:09 pm

phonegap database API

Max, please take a look at this project http://project.tiggzi.com/view/4d85a5...
i've tried debugging it with tiggzi mobile but nothing happens when i try to do simple SQL transactions. looks like something with tiggzi and phonegap DB API, i can't debug it properly.
try to click on the first button which says "Show My Location"
it has a simple javascript its running with lots of console.log output

appreciate your advice

thanks
Adi

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

phonegap database API

What exactly doesn't work, SQLite API or Geolocation? I tested your app in browser and 'Show My Location' worked. You do need to allow the browser to get your location. There is usually a message that's is shown but you also might have to enable it in setting.

Return to “Issues”