title: Tizen web app works on simulator, but doesn't work on gear 3
body: <p>I'm trying to develop an app that reads data from the acceleration sensor, and save it on a text file. Using web app development, I've managed to make the app work on the emulator, but when I tried it on Samsung Gear 3 frontier, it didn't work. Can some figure out what I did wrong? 
  Below are the html and the java script code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width,user-scalable=no"&gt;
      &lt;title&gt;Basic&lt;/title&gt;
      &lt;link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css"&gt;
      &lt;link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css"&gt;
      &lt;!-- load theme file for your application --&gt;
      &lt;link rel="stylesheet" href="css/style.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class="ui-page ui-page-active" id="main"&gt;
          &lt;header&gt;
              &lt;h2 class="ui-title"&gt;TAU Basic&lt;/h2&gt;
          &lt;/header&gt;
          &lt;div class="ui-content ui-content-padding"&gt;
              &lt;p id="readings"&gt; Basic &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;script src="lib/tau/wearable/js/tau.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/app.js"&gt;&lt;/script&gt;
      &lt;script src="js/lowBatteryCheck.js"&gt;&lt;/script&gt;
      &lt;script src="js/circle-helper.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Java script code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function init() {
   console.log("app started");
   document.getElementById("readings").innerHTML="Starting";
   accelerationSensor=tizen.sensorservice.getDefaultSensor("ACCELERATION");
   if (accelerationSensor){
    console.log("Sensor captured");
   }
   
   
      /* Update the clock hands every second */
   accelerationSensor.start(onsuccessCB);
      setInterval(function() {
          updateTime();
      }, 1000);
  }
  
  window.onload = init();
  
  
  function onGetSuccessCB(sensorData)
  {
   var datetime = tizen.time.getCurrentDateTime();
   var Date = ("0" + datetime.getHours()).slice(-2)   + ":" + 
      ("0" + datetime.getMinutes()).slice(-2) + ":" + 
      ("0" + datetime.getSeconds()).slice(-2);
   console.log(Date);
      console.log("######## Get acceleration sensor data ########");
      console.log("x: " + sensorData.x);
      console.log("y: " + sensorData.y);
      console.log("z: " + sensorData.z);
     
   
      x = sensorData.x;
      y = sensorData.y;
      z = sensorData.z;
      
      tizen.filesystem.resolve("documents", function(dir) 
           {
              
              var newFile = dir.resolve("newFilePath.txt");;
              newFile.openStream(
               "a",
               function(fs) {
                 fs.write(Date+"\t x:"+x+"\t y:"+y+"\t z:"+z+"\n");
                 fs.close();
               }, function(e) {
                 console.log("Error " + e.message);
               }, "UTF-8");
           },function(){
            document.getElementById("readings").innerHTML="Error";
           });
      document.getElementById("readings").innerHTML="Reading";
  }
  function onerrorCB(error)
  {
      console.log("error occurred: " + error.message);
  }
  function onsuccessCB()
  {
      console.log("acceleration sensor start");
      var datetime = tizen.time.getCurrentDateTime();
      var hour = datetime.getHours(),
      var minute = datetime.getMinutes(),
      var second = datetime.getSeconds();
  
      tizen.filesystem.resolve("documents", function(dir) 
           {
        
              
              newFile = dir.createFile("newFilePath.txt");
              newFile.openStream(
               "w",
               function(fs) {
                 fs.write(hour+":"+minute+":"+second+"\tstart of recording \n");
                 fs.close();
               }, function(e) {
                 console.log("Error " + e.message);
               }, "UTF-8");
           },function(){
            document.getElementById("readings").innerHTML="Error";
           });
  
  }
  function updateTime() {
      
   
   accelerationSensor.getAccelerationSensorData(onGetSuccessCB, onerrorCB);
  }
  
  
  
  (function () {
   window.addEventListener("tizenhwkey", function (ev) {
    var activePopup = null,
     page = null,
     pageid = "";
  
    if (ev.keyName === "back") {
     activePopup = document.querySelector(".ui-popup-active");
     page = document.getElementsByClassName("ui-page-active")[0];
     pageid = page ? page.id : "";
  
     if (pageid === "main" &amp;&amp; !activePopup) {
      try {
       tizen.application.getCurrentApplication().exit();
      } catch (ignore) {
      }
     } else {
      window.history.back();
     }
    }
   });
  }());</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance.</p>