title: How to find the last updated value of GPS in Cache in android
body: <h2>What i have:</h2>
  
  <p>I get the last updated value from the GPS cache as below</p>
  
  <pre><code>Location location;
  
  location = appLocationService.getLocation(LocationManager.NETWORK_PROVIDER);
  if(location!=null){
      latitude=location.getLatitude();
      longitude=location.getLongitude();
  } 
  </code></pre>
  
  <h2>What I am trying to do:</h2>
  
  <ol>
  <li>How can I find out the last updated cache in GPS is not more than an
  hour ago</li>
  <li>How can I find out the last updated cache in GPS is not more than a
  day ago</li>
  </ol>