public void setVenueData(String venueID) { final Venue venue = myRealm.where(Venue.class).equalTo("id", venueID).findFirst(); Log.d("Full venue", venue.toString()); // update the remaining fields with the new volley data _venue_title.setText(venue.getName()); try { _venue_website_official.setText(venue.getWebsite()); } catch (Exception e) { _venue_website_official.setText("NA"); } try { _venue_website_sw.setText(venue.getSw_website()); } catch (Exception e) { _venue_website_sw.setText("NA"); } String address, address1, address2, city, post_code; address = address1 = address2 = city = post_code = ""; try { address1 = venue.getLocation().getAddress_1() + "\n"; } catch (Exception e) { Log.d(TAG, "No address1"); } try { address2 = venue.getLocation().getAddress_2() + "\n"; } catch (Exception e) { Log.d(TAG, "No address2"); } try { city = venue.getLocation().getCity() + "\n"; } catch (Exception e) { Log.d(TAG, "No city"); } try { post_code = venue.getLocation().getPost_code(); } catch (Exception e) { Log.d(TAG, "No post code"); } address = address1 + address2 + city + post_code; _venue_address.setText("Address: " + address); Log.d("Venue", "" + venue.getLocation().getAddress_1()); try { if (venue.getImage_URL() != null) { IMAGE_URL_VENUE = venue.getImage_URL(); } } catch (Exception e) { Log.d(TAG, "No venue image"); } }