简体   繁体   中英

AJAX access to internal storage from Cordova app?

Is there a way to save a file from the Java side so that it is accessible via a web request (AJAX, img/script src, link href, etc)?

I can write files via openFileOutput , is that directory accessible via the JS app?

I know I can write files to external media and access those via the File api, but that's not what I'm looking for (though will have to revert to this if necessary).

The usage is writing images to a cache via a plugin and just loading those images by a normal img src, though would like to use this for other things.

Yes, PhoneGap apps have access to this directory. The path to that directory would be:

file:///data/data/{package name}/{file name}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM