This is the openexchangerate from where I want to parse the EUR Rate
@Override
protected Void doInBackground(Void... voids) {
try {
String uRl = "https://openexchangerates.org/api/latest.json?app_id=9d60a61dd1914783b037cc5835ee9829&symbols=EUR";
JSONObject reader = new JSONObject(uRl);
JSONObject sys = reader.getJSONObject("rates");
EUR = sys.getString("EUR");
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
progressDialog.dismiss();
textView.setText(EUR);
}
This is my code to parse the EUR Rate. I used a simple textview in xml to display the rate. But nothing is getting displayed in the emulator. Could someone please help me where I am making mistake?