Within my application, I want to check if there is any updated version of my application is in the app store. If there is any, then have to inform the user through an alert
Well there is another way I figured out and this is how I am doing it.
HttpPost httppostUserName = new HttpPost("https://androidquery.appspot.com/api/market?app=com.supercell.clashofclans"); //your package name
HttpClient httpclient = new DefaultHttpClient();
HttpResponse responseUser = httpclient.execute(httppostUserName);
String responseStringUser = EntityUtils.toString(responseUser.getEntity(), HTTP.UTF_8);
Log.d(Constants.TAG, "Response: " + responseStringUser);
try {
JSONObject Json = new JSONObject(responseStringUser);
newVersion = Json.getString("version");
} catch (Exception e) {
e.printStackTrace();
}
You will get a clearer view if you paste the url in your browser to see the results.