Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Android and WebSQL
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
t...@tomb.io  
View profile  
 More options Feb 13, 8:06 am
From: t...@tomb.io
Date: Wed, 13 Feb 2013 05:06:04 -0800 (PST)
Local: Wed, Feb 13 2013 8:06 am
Subject: Android and WebSQL

I am building an application using PhoneGap on Android and iOS, we're using
WebSQL to persist some items. The application runs fine and persists on iOS
properly, however the behaviour doesn't seem to be working on Android
(4.2.1 Galaxy Nexus).

We open our database with:

window.openDatabase('name', '', 'name', size)

However between restarts of the application on Android it appears to be
opening a NEW database every time. Is this expected behaviour, or am I
missing something completely?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam  
View profile  
 More options Feb 13, 5:32 pm
From: Sam <samuel.miche...@gmail.com>
Date: Wed, 13 Feb 2013 14:32:01 -0800 (PST)
Local: Wed, Feb 13 2013 5:32 pm
Subject: Re: Android and WebSQL

Strange, we use WebSQL on Android without any problem :
openDatabase('mosadb, '1.0', 'Desc Database', 4 * 1024 * 1024);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
t...@tomb.io  
View profile  
 More options Feb 15, 5:13 am
From: t...@tomb.io
Date: Fri, 15 Feb 2013 02:13:04 -0800 (PST)
Local: Fri, Feb 15 2013 5:13 am
Subject: Re: Android and WebSQL

We narrowed it down to the first run it throwing SECURITY_ERR, so
cordova.js uses storage.openDatabase, but subsequent runs it doesn't throw
SECURITY_ERR so seems to use the browser's window.openDatabase which I
assume is opening a 'new' database and therefore not reading the existing
one. I monkey patched cordova.js to always use storage.openDatabase on
Android which I feel isn't a great solution.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »