I have JSON that keep changing , I need in android to keep updating the changes , how i can do this ?
my Android code is
r = getImage();
JSONObject data = new JSONObject(r);
String a = data.getString("name");
Toast.makeText(getApplicationContext(),a, Toast.LENGTH_SHORT).show();//This prints the name
so in this code I have it onCreate so it will execute one time , where do I begin to make it update automatically ?
JSON is backdated, try GSON which is developed by google using JSON api.
It provides very good functionality so that this class is converted to string in json format and the other end the json string dematerialized and convert it to class format. So that it is very easy to handle. All json processing is done into GSON api.
Try this gson
Hope you can do it as your target.