Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature of gpsLocationFetched() is wrong in the documentation. #1

Open
AwaisMajeed2536 opened this issue Oct 9, 2017 · 2 comments

Comments

@AwaisMajeed2536
Copy link

There is no method with the following signature....
public void gpsLocationFetched(Location location, String placeName) {}
instead its
public void gpsLocationFetched(Location location) {}
how do I get location name using this library? please respond soon..... Thanks

@ankuryadav7
Copy link
Owner

Hi Awais,
Yes there is a typo error. Have removed the place name parameter from the method because sometimes Geocoder gives "null" in location name.

You can use the below class for getting the place name.
https://github.com/ankuryadav7/FusedBulb/blob/master/app/src/main/java/com/fusedbulb/GetAddress.java

Example-:
public void gpsLocationFetched(Location location) {
if (location!=null){
// you will get user's current location
String place_name=new GetAddress(this).fetchCurrentAddress(location)
}else {
Toast.makeText(this,"Unable to find location",Toast.LENGTH_SHORT).show();
}
}

@AwaisMajeed2536
Copy link
Author

AwaisMajeed2536 commented Oct 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants