title: update data to server in the background android
body: <p>How to update data to server ? I have used the code below but its not executing after 10 mins.</p>
  
  <pre><code>ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
          executor.scheduleWithFixedDelay(new Runnable(){
  
              public void run() {
  
  //update data to server
  
              }
  
      }, 0, 600, TimeUnit.SECONDS);
  </code></pre>