Cordova provides backup shims for SQLite and localStorage. However,
how it works is if the native WebView component on the platform
provides these storage mechanisms already (for example, Android 2.2
and above, iOS 4 and above, and other similar platforms), then Cordova
will "step back" and let the native platform do its thing.
As such, in most modern cases today, the storage capabilities that
Cordova tries to fill in are not actually enabled.
If you *really* want, you can access these native shims for storage,
but you will have to use some different approaches.
On Android, during phonegap/cordova .js initialization, we test
whether the storage shim should kick in. (You can see that here:
https://github.com/apache/incubator-cordova-js/blob/master/lib/android/platform.js#L54-L93).
This shim eventually routes to this JavaScript interface:
https://github.com/apache/incubator-cordova-js/blob/master/lib/android/plugin/android/storage.js
. From your app, if you want to use this, you could do something like:
var storage = cordova.require('cordova/plugin/android/storage');
var storageAPI = storage.CupcakeLocalStorage;
Then on the "storageAPI" object you will have methods such as setItem,
removeItem, getItem and clear. These methods will route to native
methods that use Java's SQLite under the hood.