I want the location of user and that too just once after that user navigates on his own
locationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE
The getLastKnownLocation method will only return a location if the gps LocationProvider has stored a location somewhere. If the user has not yet used the gps on his device long enough to obtain a valid GPS fix the method will return null.
Even if you retrieve a location check the time of the location, there is no guarantee that the location isn't very very old.