Initially i was able to get location by using Location.getCurrentPositionAsync() method, but now this method keeps throwing error: Location provider is unavailable. Make sure that location services are enabled.
Currently it is working with Location.getLastKnownPositionAsync() method, but getCurrentPositionAsync() keeps throwing error despite of all the LocationProvider variables are giving true response.