Necesito enviar por get una variable adicional a la url , mi codigo es este
private final String mGeoJsonUrl = "http://181.XXX.XXX.XXX:8080/MIPAGINA.php?id=" + id ;
protected void start() {
DownloadGeoJsonFile downloadGeoJsonFile = new DownloadGeoJsonFile();
// Download the GeoJSON file
downloadGeoJsonFile.execute(mGeoJsonUrl);
}
protected JSONObject doInBackground(String... params) {
try {
// List params = new ArrayList();
// getting JSON string from URL
// Open a stream from the URL
InputStream stream = new URL(params[0]).openStream();
// JSONObject json = jParser.makeHttpRequest(mGeoJsonUrl, "GET", params);
String line;
StringBuilder result = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
while ((line = reader.readLine()) != null) {
// Read and save each line of the stream
result.append(line);
}
// Close the stream
reader.close();
stream.close();
// Convert result to JSONObject
return new JSONObject(result.toString());
} catch (IOException e) {
Log.e(mLogTag, "GeoJSON file could not be read");
} catch (JSONException e) {
Log.e(mLogTag, "GeoJSON file could not be converted to a JSONObject");
}
return null;
}