Phonegap LocalStorage - Requires File System Permission

Making a basic android app for android. Everything works fine and uses localstorage (http://docs.phonegap.com/en/1.3.0/phonegap_storage_storage.md.html#localStorage) to save data.

I use

<preference name="permissions" value="none"/>

      

in my config.xml. When I install the package, it still asks for internet, network and storage. This is fine, and I understand that when I bring it to market, it actually only requires the Internet (great).

My question is :) Do I need filesystem permissions to use localstorage? ... Or does it get access to DomLocalStorage by using Internet permissions? I just don't want to ask for more permissions than are completely necessary.

I try this myself anyway and post an answer in case no one answers .. but I figured it might help someone else anyway!

+3


source to share


2 answers


I suspect not. PhoneGap uses the same local resource as the browser and does not require special permissions. So I cannot imagine that you need to explicitly specify the file system permission in your manifest.



+2


source


I faced a similar issue now using Cordova. The WRITE_EXTERNAL_STORAGE, READ_PHONE_STATE and READ_EXTERNAL_STORAGE permissions have somehow infiltrated AndroidManifest.xml.

LocalStorage does not necessarily create these permissions, only occasionally. I didn't figure out when, but I always got them when I used the createjs framework. (Not sure if this is some kind of causality.)



There seems to be more violations ... In one project I was able to get rid of these permissions by simply removing them from the AndroidManifest. Otherwise it didn't help and they were updated after every build. The only thing that "helped" was to completely remove the local block from the JS code and reinstall the Android platform in the project.

0


source







All Articles