@@ -0,0 +1,2641 @@
+package com.esp.screwesp;%0A%0Aimport android.app.Fragment;%0Aimport android.content.Context;%0Aimport android.os.AsyncTask;%0Aimport android.util.Log;%0Aimport android.app.Activity;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0A%0Aimport com.pkmmte.view.CircularImageView;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0A/**%0A * Created by hp on 02-Jan-15.%0A */%0A%0Apublic class AsyncTaskParseJson extends AsyncTask%3CString, String, String%3E %7B%0A%0A    private Context mContext;%0A    private View rootView;%0A    private CircularImageView cView;%0A%0A    public AsyncTaskParseJson(CircularImageView circularImageView)%7B%0A        //this.mContext = context;%0A        //this.rootView = rootView;%0A        this.cView = circularImageView;%0A%0A    %7D%0A%0A    static String version = %221.0.0%22;%0A    final String TAG = %22AsyncTaskParseJson.java%22;%0A%0A    // set your json string url here%0A    String Url = %22http://techfest13.co.nf/version_control.json%22;%0A%0A    // contacts JSONArray%0A    JSONArray dataJsonArr = null;%0A%0A    @Override%0A    protected void onPreExecute() %7B%7D%0A%0A    @Override%0A    protected String doInBackground(String... arg0) %7B%0A%0A        try %7B%0A%0A            // instantiate our json parser%0A            JsonParser jParser = new JsonParser();%0A%0A            // get json string from url%0A            JSONObject json = jParser.getJSONFromUrl(Url);%0A%0A            // get the array of users%0A            dataJsonArr = json.getJSONArray(%22Users%22);%0A%0A            // loop through all users%0A            for (int i = 0; i %3C dataJsonArr.length(); i++) %7B%0A%0A                JSONObject c = dataJsonArr.getJSONObject(i);%0A%0A                // Storing each json item in variable%0A                version = c.getString(%22version%22);%0A                //version = version.toString();%0A%0A                // show the values in our logcat%0A                Log.e(TAG, %22version: %22 + version);%0A%0A            %7D%0A%0A        %7D catch (JSONException e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        return null;%0A    %7D%0A%0A    @Override%0A    protected void onPostExecute(String strFromDoInBg) %7B%0A%0A        String current_version = %221.0.0%22;%0A        String server_version = AsyncTaskParseJson.return_version();%0A        boolean result = current_version.equals(server_version);%0A        Log.d(%22Result%22, %22Result = %22 + result + %22 server version= %22 + server_version + %22 local version =%22 + current_version);%0A%0A        if (!result) %7B%0A            //CircularImageView circularImageView = (CircularImageView) rootView.findViewById(R.id.circularview);%0A            cView.setImageResource(R.drawable.update);%0A        %7D%0A    %7D%0A%0A    public static String return_version()%0A    %7B%0A        return version;%0A    %7D%0A%7D%0A

Create AsyncTaskParseJson.java