Page 1 of 2
phonegap database API
Posted: Tue Jul 03, 2012 9:37 am
by adi
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
phonegap database API
Posted: Tue Jul 03, 2012 1:11 pm
by maxkatz
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).
phonegap database API
Posted: Tue Jul 03, 2012 1:21 pm
by adi
phonegap database API
Posted: Tue Jul 03, 2012 1:28 pm
by maxkatz
Yes, won't work. PhoneGap API is only available when running on the actual device (as hybrid app).
phonegap database API
Posted: Tue Jul 03, 2012 1:53 pm
by adi
so same code tested on the device will work? how about IOS?
phonegap database API
Posted: Tue Jul 03, 2012 2:12 pm
by maxkatz
Yes, should work on iOS and Android.
phonegap database API
Posted: Wed Jul 04, 2012 9:26 am
by adi
Max, i've installed on the android device. something is not working, what is the procedure to debug it (other then Alert("bla bla")
phonegap database API
Posted: Wed Jul 04, 2012 2:47 pm
by maxkatz
If you use console.log(...), using Tiggzi Mobile Tester launch the app in Debug mode. You should see the messages in Log View tab.
phonegap database API
Posted: Wed Jul 04, 2012 7:43 pm
by adi
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
phonegap database API
Posted: Thu Jul 05, 2012 12:10 am
by maxkatz
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.