I’m making a LocationListener. When created, does onLocationChanged get called? (Originally there is no location so it makes some sense that it is called)
Or is there some other way to get the current location?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can easily test this question yourself…
But yes, if you create a
LocationListenerand callLocationManager#requestLocationUpdates(), thenonLocationChanged()is called after the first location is acquired. Understand that if you are somewhere that cannot receive any GPS or Network signals (in a thick build or a cave) you may never receive a location fix…