Hi.

I'm using the Database Storage API in a WebView and have been
researching the available javascript methods.

The javascript openDatabase() method is documented to have an optional
fifth parameter which is a callback function to execute once the
openDatabase() method has completed (but only if the database has been
created - see below).

The openDatabase() method is asyncronous so i need to query the
database after it has been created and is ready for use, NOT after the
openDatabase() method has been executed.

Hope that makes sense but anyway my question is does the WebView's
javascript openDatabase() method support this fifth optional
parameter?

Some example javascript:

function dbCreated(transaction){
        console.log('debug#2');
}
console.log('debug#1');
var shortName='locationTracker', version='1.0', displayName='Some
text', maxSize=32768;
var database=openDatabase(shortName, version, displayName, maxSize,
dbCreated);
console.log('debug#3');

In the log i see 'debug#1' and 'debug#3' but never see 'debug#2'.

The callback is supposed to only be called if the database has been
created and opened.
It is not called if the database already existed and has been opened
but not created.

http://html5doctor.com/introducing-web-sql-databases/

Scroll down to 'Creating and Opening Databases' and 5. Creation
callback.

I've uninstalled my app a few times and reinstalled it - thinking that
the database definitely will not exist so will be created and the
callback will execute but the callback still fails to execute.

This is on a Froyo emulator and also on my ZTE Blade with cyanogen mod
Gingerbread.

Has anyone got any experience with the javascript database storage api
and could tell me if this callback is supported?

Thanks.

Martin.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to