title: manage setinterval & clearInterval methods in titanium studio
body: <p>In my android app, developing by titanium studio 3.1.3, I have tab group where in the last(fifth tab) I am using button to open a new page
  -> new page contains switch, if switch is on I am calling a method like</p>
  
  <pre><code>function locationSetEnable() {
      Ti.App.Properties.setString('getLocation', 'YES');
      getlocation_coords();
      timer = setInterval(getlocation_coords, 20000);
  }
  </code></pre>
  
  <p>so it is calling getlocation_coords method in every 20 seconds, and If switch is off I am calling other method,</p>
  
  <pre><code>function locationSetDisable() {
      Titanium.Geolocation.removeEventListener('location', locationCallback);
      clearInterval(timer);
      Ti.App.Properties.setString('getLocation', 'NO');
  }
  </code></pre>
  
  <p>so, here clear interval is working properly the method getlocation_coords calling is stopped.</p>
  
  <p>it is happening only I am on the same screen.</p>
  
  <p>My issue is :</p>
  
  <p>If my switch is on, and I moved into any other screen/tab and coming back to same screen and now I am going off my switch this time the clearInterval is not working, it is calling autometically the getlocation_coords method is calling continiously, how do I resolve this issue?</p>
  
  <p>Thanks in advance</p>