cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Martin (JIRA)" <>
Subject [jira] [Commented] (CB-4851) Android Storage API
Date Sat, 28 Sep 2013 00:14:02 GMT


Andrew Martin commented on CB-4851:

To tide people over in the meantime until it gets fixed the following ugly, ugly hack works
for me...

In your android platform directory navigate through the plugins src package folders to...


Create a text file and name it

Copy and paste into that file the contents of here...;a=blob_plain;f=framework/src/org/apache/cordova/;h=34ebf387d31a126b1e3b306eff164c4d0320488d;hb=df1536ea77e97b7d362a19582f8beddd168c5ec3

This is a 2.9.x file, I couldn't find a newer one?

Next, change in the you just created the following lines...

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;


import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;

Now, (making sure you have added the storage feature in your config.xml) the code will compile
and work :)
> Android Storage API
> -------------------
>                 Key: CB-4851
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.0.0
>            Reporter: Dick van den Brink
>            Assignee: Joe Bowser
>              Labels: android, storage
> According to the documentation the Storage API is provided in the core of cordova, but
it is removed from the Android Core.
> Documentation:
> {quote}As of version 3.0, access to Storage APIs is built into Cordova, and does not
require using the CLI to add plugins as described in The Command-line Interface.
> {quote}
> I did add the xml to the config page but I get the following error:
> {quote}
> Error adding plugin org.apache.cordova.Storage.
> exec() call to unknown plugin: Storage
> java.lang.ClassNotFoundException: org.apache.cordova.Storage
> at java.lang.Class.classForName(Native Method)
> at java.lang.Class.forName(
> at java.lang.Class.forName(
> at org.apache.cordova.PluginEntry.getClassByName(
> {quote}
> Is the documentation wrong or is the Storage class incorrectly deleted?
> Note: the storage code is still provided in cordova.js, but not in the jar. Also the
Java code is in the 2.9 branch. It is deleted in the commit with sha1 id: adcbd879c846dd3f7a3db960a3c7af14acbbda41

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message