I am using google fusedLocationapi for fetching lats and longs. Now i am having a problem here actually i want to get lat and long only at my button click event. That's why i think i don't need to request for location updates which can save my user's battery power. Now in the fusedlocationapi example every one use
mLocationRequest.setInterval(10000); // Update location every second
LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
I ran my code without using above two lines of code and i fetched my location using below code
mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
But it is showing same lats and longs, now can any one please tell me how can i fetch lats and longs using fusedlocationapi without requesting for location updates.