// Path: EasyParkAndroidSourceCode/src/com/swetha/helpers/Constants.java
// public class Constants {
// 	
// 	
// 	//public static String IPAddress = "http://192.168.1.25:80/easypark";  //Home
// 	//public static String IPAddress = "http://172.30.15.107:80/easypark";	//PSU
// 	public static String IPAddress = "http://easypark.net46.net/easypark";  // Site hosted in 000webhost.com 
// 	public static String IPAddressForFreePArkingLots = "http://192.168.1.25:80/easypark"; 
// 	
// 	
// 	public static double millisecondsIntoHours = 3600000.0;
// 	public static double doubleDefaultValue = 0.0;
// 	public static long thrityMinInMilliSeconds = 1800000;// milliseconds to 30 min
// 	public static long tenMinutesInMilliseconds = 600000;
// 	
// 	public static String TAG_SUCCESS = "success";
// 	public static String hmFreePLlatitude = "latitude";
// 	public static String hmFreePLlongitude = "longitude";
// 	public static String hmFreePLAddress = "address";
// 	public static String hmFreePLNoOfSpots = "nooflots";
// 	public static String hmFreePLMiles = "miles";
// 	public static String hmFreePLTime = "time";
// 	public static String hmFreePLUser = "user";
// 	
// 	public static String GOOGLEDIRECTIONSURL = "http://maps.googleapis.com/maps/api/directions/xml?";
// 	public final static String MODE_DRIVING = "driving";
// 	public final static String MYPREFERENCES = "MYPREFERENCES";
// 	public final static String UNAME = "UNAME";
// 	public final static String UPDATEDBY = "Updated by";
// 	public final static String AT= "at";
// 	public final static String VACANTSPOTS = "Vacant spot(s) =";
// 		
// 	
// 	
// 	 public final static  SimpleDateFormat dtf = new SimpleDateFormat("MM-dd-yyyy HH:mm");
// 
// }
// 
// Path: EasyParkAndroidSourceCode/src/com/swetha/helpers/DateTimeHelpers.java
// public  class DateTimeHelpers {
// 	 public static final SimpleDateFormat dtf = new SimpleDateFormat("MM-dd-yyyy HH:mm");
// 
// 	public static String convertToTimeFromLong(long time){
// 	    Calendar cal = Calendar.getInstance();
// 	    //cal.setTimeZone(TimeZone.getTimeZone("PDT"));
// 	    cal.setTimeInMillis(time);
// 	    return ((cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DAY_OF_MONTH) + "-" 
// 	            + cal.get(Calendar.YEAR) + " " + cal.get(Calendar.HOUR_OF_DAY) + ":"
// 	            + cal.get(Calendar.MINUTE));
// 
// 	}
// 	
// 	public static long convertToLongFromTime(String string_time){
// 		Date d = new Date();
// 		try
// 		{
// 			
// 		d = dtf.parse(string_time);
// 		}
// 		catch(Exception e)
// 		{
// 			e.setStackTrace(null);
// 		}
// 		return d.getTime();
// 
// 	}
// 
// }


import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.swetha.helpers.Constants;
import com.swetha.helpers.DateTimeHelpers;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;
		
		return null;
	}
	
	protected void onPostExecute(String file_url) {
  
        pDialog.dismiss();
        //calling  UI thread to update UI
        dfvpl.updatefreeParkingLotsList(freeparkingLotsMapList, success);

    }
	
}


@SuppressWarnings("deprecation")
public void updatefreeParkingLotsList(ArrayList<HashMap<String, String>> freeparkingLotsMapList, int success)
{
	
		setListAdapter(null);
	
	// TODO Auto-generated method stub
	if (success == 1)
	{
		
	adapter = new SimpleAdapter( DisplayFreeParkingLotsNearMeActivity.this,freeparkingLotsMapList, R.layout.displayindividualfreeparkinglots, new String[] { Constants.hmFreePLAddress,Constants.hmFreePLNoOfSpots,Constants.hmFreePLMiles,Constants.hmFreePLTime, Constants.hmFreePLlatitude, Constants.hmFreePLlongitude}, new int[] {R.id.txtvw_displayfreelotsinfo, R.id.tv_numberOffreespots, R.id.noofmilesfp,R.id.tv_lastupdatedInfo, R.id.tv_latitude, R.id.tv_longitude});
	setListAdapter(adapter);
	
	}
	
// Path: EasyParkAndroidSourceCode/src/com/swetha/helpers/Constants.java
// public class Constants {
// 	
// 	
// 	//public static String IPAddress = "http://192.168.1.25:80/easypark";  //Home
// 	//public static String IPAddress = "http://172.30.15.107:80/easypark";	//PSU
// 	public static String IPAddress = "http://easypark.net46.net/easypark";  // Site hosted in 000webhost.com 
// 	public static String IPAddressForFreePArkingLots = "http://192.168.1.25:80/easypark"; 
// 	
// 	
// 	public static double millisecondsIntoHours = 3600000.0;
// 	public static double doubleDefaultValue = 0.0;
// 	public static long thrityMinInMilliSeconds = 1800000;// milliseconds to 30 min
// 	public static long tenMinutesInMilliseconds = 600000;
// 	
// 	public static String TAG_SUCCESS = "success";
// 	public static String hmFreePLlatitude = "latitude";
// 	public static String hmFreePLlongitude = "longitude";
// 	public static String hmFreePLAddress = "address";
// 	public static String hmFreePLNoOfSpots = "nooflots";
// 	public static String hmFreePLMiles = "miles";
// 	public static String hmFreePLTime = "time";
// 	public static String hmFreePLUser = "user";
// 	
// 	public static String GOOGLEDIRECTIONSURL = "http://maps.googleapis.com/maps/api/directions/xml?";
// 	public final static String MODE_DRIVING = "driving";
// 	public final static String MYPREFERENCES = "MYPREFERENCES";
// 	public final static String UNAME = "UNAME";
// 	public final static String UPDATEDBY = "Updated by";
// 	public final static String AT= "at";
// 	public final static String VACANTSPOTS = "Vacant spot(s) =";
// 		
// 	
// 	
// 	 public final static  SimpleDateFormat dtf = new SimpleDateFormat("MM-dd-yyyy HH:mm");
// 
// }
// 
// Path: EasyParkAndroidSourceCode/src/com/swetha/helpers/DateTimeHelpers.java
// public  class DateTimeHelpers {
// 	 public static final SimpleDateFormat dtf = new SimpleDateFormat("MM-dd-yyyy HH:mm");
// 
// 	public static String convertToTimeFromLong(long time){
// 	    Calendar cal = Calendar.getInstance();
// 	    //cal.setTimeZone(TimeZone.getTimeZone("PDT"));
// 	    cal.setTimeInMillis(time);
// 	    return ((cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DAY_OF_MONTH) + "-" 
// 	            + cal.get(Calendar.YEAR) + " " + cal.get(Calendar.HOUR_OF_DAY) + ":"
// 	            + cal.get(Calendar.MINUTE));
// 
// 	}
// 	
// 	public static long convertToLongFromTime(String string_time){
// 		Date d = new Date();
// 		try
// 		{
// 			
// 		d = dtf.parse(string_time);
// 		}
// 		catch(Exception e)
// 		{
// 			e.setStackTrace(null);
// 		}
// 		return d.getTime();
// 
// 	}
// 
// }


// Path: EasyParkAndroidSourceCode/src/com/swetha/easypark/DisplayFreeParkingLotsNearMeActivity.java
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.swetha.helpers.Constants;
import com.swetha.helpers.DateTimeHelpers;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;

		
		return null;
	}
	
	protected void onPostExecute(String file_url) {
  
        pDialog.dismiss();
        //calling  UI thread to update UI
        dfvpl.updatefreeParkingLotsList(freeparkingLotsMapList, success);

    }
	
}


@SuppressWarnings("deprecation")
public void updatefreeParkingLotsList(ArrayList<HashMap<String, String>> freeparkingLotsMapList, int success)
{
	
		setListAdapter(null);
	
	// TODO Auto-generated method stub
	if (success == 1)
	{
		
	adapter = new SimpleAdapter( DisplayFreeParkingLotsNearMeActivity.this,freeparkingLotsMapList, R.layout.displayindividualfreeparkinglots, new String[] { Constants.hmFreePLAddress,Constants.hmFreePLNoOfSpots,Constants.hmFreePLMiles,Constants.hmFreePLTime, Constants.hmFreePLlatitude, Constants.hmFreePLlongitude}, new int[] {R.id.txtvw_displayfreelotsinfo, R.id.tv_numberOffreespots, R.id.noofmilesfp,R.id.tv_lastupdatedInfo, R.id.tv_latitude, R.id.tv_longitude});
	setListAdapter(adapter);
	
	}
	
		else