Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onLocationChanged(Location location) {
- try {
- //Get address infos with Geocoder class
- List<Address> addresses = new Geocoder(getActivity(), Locale.getDefault())
- .getFromLocation(location.getLatitude(), location.getLongitude(), 1);
- //Return the address of user
- String actualAddress = addresses.get(0).getAddressLine(0);
- mActualLocation.setText(actualAddress);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment