private void sendLocation() { if (mGPS.canGetLocation() && mGPS.getLatitude() != 0.00 && mGPS.getLongitude() != 0.00) { double myLat = mGPS.getLatitude(); double myLong = mGPS.getLongitude(); String latlng = (Double.toString(myLat) + "," + Double.toString(myLong)); updateList(KEY_MESSAGE_MAP, latlng, false); HashMap<String, String> content = new HashMap<>(); content.put("type", KEY_MESSAGE_MAP); content.put("latitude", Double.toString(myLat)); content.put("longitude", Double.toString(myLong)); send(content); } else { mGPS.showSettingsAlert(this); } }