Access Read/Write Text File.


Napoleone Lattarulo

Ola David

I find some difficulties to read and write text file in the data directory. Obviously I followed your 'Files' demo by adding the appropriate plugin cordova-plugin-file. Probably it can help you that at installation time of the apk it does not appear permission: read from SD contents (unique permission LAN access).

Balscioi Spassiba


DecSoft

Hello Napoleone,

Sorry, but, I can't reproduce the problem here in Android 6.0. The Files app sample already includes the Apache Cordova File plugin, so, you no need to add it by yourself. On the other hand, the App Builder "Files*" action store the created files in an "app data directory", which, do not requires permissions, according to the documentation. I test the Files app sample right now (without permissions) and they works as expected.

P.S. I note that the "to be write" input is empty by default... maybe you trying to write that empty input and therefore can't get nothing readed from the "Other.txt" file? I will add some default content for that input for the next App Builder release.



Napoleone Lattarulo

Vale David I Solved the problem forcing versione of cordova plugin:

with spec=3.0.0. editing directly/manually the config.xml

How i can force this directive in the App project.


DecSoft

Hello Napoleone,

The point is what do you need to do that... that is, why you can't use the latest version of the File Cordova plugin.

You no need to deal with XML at all (even when you can do it in the Extra XML option of the app).

My recomendation is that you try with the Files sample "as is", and view if they works for you like for me.

On the other hand, answering your question, if you want to add the Cordova File plugin, for example, specifiying a version, then you must "uncheck" the File plugin from App Cordova -> General -> Plugins, and, add the below code to the App Cordova -> Batch -> After:


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.