Code example for Address

Methods: getSubLocality

0
		this.longi = longi;
	try { 
        List<Address> addressList = GeoAddressProvider.geocoder.getFromLocation(lati/1e6, longi/1e6, 1);
        if (addressList != null  && !addressList.isEmpty()) {
            Address addr = addressList.get(0);
            this.subLocality = addr.getSubLocality();
            this.address = GeoAddress.constructAddressLine(addr);
        } 
    } catch (IOException e) {
        e.printStackTrace();
    } 
	} 
 
	public SBGeoPoint(SBLocation location) {
		super((int)(location.getLatitude()*1e6), (int)(location.getLongitude()*1e6));
		lati = (int)(location.getLatitude()*1e6);
		longi = (int)(location.getLongitude()*1e6);
        subLocality = location.getSubLocality();
        address = location.getAddress();
	}