title: How to get my current longitude and latitude from my Android device
body: <p>I am using this code. but getting null in longitude and latitude.</p>
  
  <pre><code>LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);    
  Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);  
  </code></pre>