FusedBulb icon indicating copy to clipboard operation
FusedBulb copied to clipboard

Signature of gpsLocationFetched() is wrong in the documentation.

Open AwaisMajeed2536 opened this issue 7 years ago • 2 comments

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

AwaisMajeed2536 avatar Oct 09 '17 07:10 AwaisMajeed2536

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(); } }

ankuryadav7 avatar Oct 09 '17 16:10 ankuryadav7

Thank you very much sir

On Oct 9, 2017 9:15 PM, "ankuryadav7" [email protected] wrote:

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(); } }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ankuryadav7/FusedBulb/issues/1#issuecomment-335206488, or mute the thread https://github.com/notifications/unsubscribe-auth/AZKIvZLdaQyrZRJWdkyLUZb2RN1FiEJYks5sqkaygaJpZM4PyEUC .

AwaisMajeed2536 avatar Oct 09 '17 16:10 AwaisMajeed2536