<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I don't know if there is a in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092914#M65912</link>
    <description>&lt;P&gt;I don't know if there is a difference, but using localStorage works for me in real apps deployed to Android and iOS devices.&lt;/P&gt;

&lt;P&gt;For example I use it to give the user the option to remember its login:&lt;/P&gt;

&lt;P&gt;Save data&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;localStorage.setItem('leche_userid',usuarioid);
localStorage.setItem('leche_pass',$("#i_password").val());
&lt;/PRE&gt;

&lt;P&gt;Recover data&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$("#i_email").val(localStorage.getItem('leche_userid'));
$("#i_password").val(localStorage.getItem('leche_pass'));
&lt;/PRE&gt;

&lt;P&gt;I think you may be confident it will work. I'm not sure, but I'm remembering that the device debug clears caches and storages when it runs.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 13:05:20 GMT</pubDate>
    <dc:creator>Diego_Calp</dc:creator>
    <dc:date>2016-08-11T13:05:20Z</dc:date>
    <item>
      <title>Add Text-File to IntelXDK-Application</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092909#M65907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am working on an Application with IntelXDK that needs to be able to remember some data. It's really simple data (name of an object + its adress) so I wanted to store it inside a text-file.&lt;/P&gt;

&lt;P&gt;I've been having a few problems with that though.&lt;/P&gt;

&lt;P&gt;Is there a possibility to just create a memory.txt file inside my application's www-directory (where there are already Dictionaries like Images/Galleria/etc. and then have access to it inside the programm?&lt;/P&gt;

&lt;P&gt;I've been trying to use the cordova-file plugin to access the file, but I don't know which location I have to use for it?&lt;/P&gt;

&lt;P&gt;This is what I'm doing right now: (error: file not found)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;document.addEventListener('deviceready', onDeviceReady, false);  
function onDeviceReady() {  
    function readFromFile(fileName, cb) {
        var pathToFile = cordova.file.dataDirectory + fileName;
        console.log(pathToFile);
        window.resolveLocalFileSystemURL(pathToFile, function (fileEntry) {
            fileEntry.file(function (file) {
                var reader = new FileReader();

                reader.onloadend = function (e) {
                    cb(JSON.parse(this.result));
                };

                reader.readAsText(file);
            }, errorHandler.bind(null, fileName));
        }, errorHandler.bind(null, fileName));
    }

    var fileData;
    readFromFile('printer_setup.txt', function (data) {
        fileData = data;
    });
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Help would be very much appreciated :) ,&lt;/P&gt;

&lt;P&gt;Konrad&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:24:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092909#M65907</guid>
      <dc:creator>Konrad_H_</dc:creator>
      <dc:date>2016-08-11T09:24:45Z</dc:date>
    </item>
    <item>
      <title>Hi Konrad,</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092910#M65908</link>
      <description>&lt;P&gt;Hi Konrad,&lt;/P&gt;

&lt;P&gt;Take a look at this blog post, it discuss some alternatives to store data in hybrid apps.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://gonehybrid.com/dont-assume-localstorage-will-always-work-in-your-hybrid-app/" target="_blank"&gt;http://gonehybrid.com/dont-assume-localstorage-will-always-work-in-your-hybrid-app/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Besides its title, I think it may have useful information for you.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 11:40:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092910#M65908</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-08-11T11:40:36Z</dc:date>
    </item>
    <item>
      <title>Hey Diego!</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092911#M65909</link>
      <description>&lt;P&gt;Hey Diego!&lt;/P&gt;

&lt;P&gt;Thank you for your response.&lt;/P&gt;

&lt;P&gt;Your solution works for me on the Intel XDK-Simulation and if I debug the HTML-File inside Google Chrome. It also seems really simple and elegant, I like it very much.&lt;/P&gt;

&lt;P&gt;Sadly it doesn't work when I debug the Application on my nexus 9 device (doesn't show any error on the Console though..). Do you have any idea why? The App has permission to use the file-system.&lt;/P&gt;

&lt;P&gt;I want to create a hybrid application for mobile devices.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Konrad&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 11:51:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092911#M65909</guid>
      <dc:creator>Konrad_H_</dc:creator>
      <dc:date>2016-08-11T11:51:00Z</dc:date>
    </item>
    <item>
      <title>Hi Konrad,</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092912#M65910</link>
      <description>&lt;P&gt;Hi Konrad,&lt;/P&gt;

&lt;P&gt;localStorage is not working on device? You mean using Debug connecting your phone to XDK or installing an APK?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 12:28:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092912#M65910</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-08-11T12:28:32Z</dc:date>
    </item>
    <item>
      <title>I tried it while debugging in</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092913#M65911</link>
      <description>&lt;P&gt;I tried it while debugging in Intel XDK when connected to the Nexus.&lt;/P&gt;

&lt;P&gt;Is there a difference to installing the APK and then running the application?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Konrad&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 12:34:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092913#M65911</guid>
      <dc:creator>Konrad_H_</dc:creator>
      <dc:date>2016-08-11T12:34:13Z</dc:date>
    </item>
    <item>
      <title>I don't know if there is a</title>
      <link>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092914#M65912</link>
      <description>&lt;P&gt;I don't know if there is a difference, but using localStorage works for me in real apps deployed to Android and iOS devices.&lt;/P&gt;

&lt;P&gt;For example I use it to give the user the option to remember its login:&lt;/P&gt;

&lt;P&gt;Save data&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;localStorage.setItem('leche_userid',usuarioid);
localStorage.setItem('leche_pass',$("#i_password").val());
&lt;/PRE&gt;

&lt;P&gt;Recover data&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$("#i_email").val(localStorage.getItem('leche_userid'));
$("#i_password").val(localStorage.getItem('leche_pass'));
&lt;/PRE&gt;

&lt;P&gt;I think you may be confident it will work. I'm not sure, but I'm remembering that the device debug clears caches and storages when it runs.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 13:05:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Add-Text-File-to-IntelXDK-Application/m-p/1092914#M65912</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-08-11T13:05:20Z</dc:date>
    </item>
  </channel>
</rss>

