FusedBulb
FusedBulb copied to clipboard
Signature of gpsLocationFetched() is wrong in the documentation.
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
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(); } }
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 .