// Path: src/com/marspotato/supportsmallshop/BO/Shop.java
// public class Shop implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 	
// 	@Expose
// 	public String id;
// 	@Expose
// 	public String name;
// 	@Expose
// 	public String shortDescription;
// 	@Expose
// 	public String fullDescription;
// 	@Expose
// 	public String searchTags;
// 	@Expose
// 	public String shopType;
// 	@Expose
// 	public String openHours;
// 	@Expose
// 	public int district;
// 	@Expose
// 	public String address;
// 	@Expose
// 	public String phone;
// 	@Expose
// 	public int latitude1000000; /* the value of latitude * 1000000, the Accuracy is ~0.1m */
// 	@Expose
// 	public int longitude1000000; /* the value of longitude * 1000000, the Accuracy is ~0.1m */
// 	@Expose
// 	public String photoUrl;
// }
// 
// Path: src/com/marspotato/supportsmallshop/util/Config.java
// public class Config {	
// 	//some enum about network
// 	public static int WIFI_ERROR = 0;
// 	public static int NETWORK_ERROR = 1;
// 	public static int OTHERS_ERROR = 2;
// 	
// 	public static int NAME_MAX_LENGTH = 20;
// 	public static int SHORT_DESCRIPTION_MAX_LENGTH = 30;
// 	public static int FULL_DESCRIPTION_MAX_LENGTH = 200;
// 	public static int OPEN_HOURS_MAX_LENGTH = 100;
// 	public static int SEARCH_TAGS_MAX_LENGTH = 200;
// 	public static int ADDRESS_MAX_LENGTH = 150;
// 	public static int PHONE_MAX_LENGTH = 10;
// 	
// 	public final static String licenseUrl = "http://www.gnu.org/licenses/gpl-3.0.txt";
// 	public final static String[] shopTypes = new String[]{"食肆", "零售（食物）","零售（其他）", "服務"}; 
// 	public final static String deviceType  = "google-android"; 
// 	
// 	public final static int DEFAULT_SEARCH_RANGE = 100;
// 	
// 	public final static int WHOLE_HK = 0;
// 	public final static int HK_ISLAND = 1;
// 	public final static int KOWL0ON = 2;	
// 	public final static int NEW_TERRITORIES = 3;
// 	
// 	public final static int HK_NORTH_LAT1000000 = 22562222;
// 	public final static int HK_SOUTH_LAT1000000 = 22153889;
// 	public final static int HK_EAST_LNG1000000 = 114441667;
// 	public final static int HK_WEST_LNG1000000 = 113835278;
// 	
// 	//REMARKS: this is development purpose ID, and URL
// 	public static final String GCM_SENDER_ID = "458074465130";
// 	public static final String HOST_URL = "http://supportsmallshop1.marspotato.com//supportsmallshop";
// 	//public static final String HOST_URL = "http://supportsmallshop.marspotato.com/supportsmallshop";
// 	
// 	//the default http timeout
// 	public static final int DEFAULT_HTTP_TIMEOUT = 10000;//10000ms = 10 seconds
// 	
// 	//after the initial fail, the number of retry of http call
// 	public static final int DEFAULT_HTTP_MAX_RETRY = 1;
// 	
// 	//max number of image to be cached in disk
// 	public static final int MAX_DISK_CACHE_IMAGE = 100;
// 	
// 	public static DateTimeFormatter defaultDisplayDateFormatter = DateTimeFormat.forPattern("yyyy-MM-dd");
// 
// 	public static DateTimeFormatter defaultDateTimeFormatter = ISODateTimeFormat.basicDateTimeNoMillis();
// 	
// 	public static Gson defaultGSON = new GsonBuilder().registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create();
// 	
// 	//time for a button to be disabled to avoid double action
// 	public static final int AVOID_DOUBLE_CLICK_PERIOD = 500;//500ms
// 	
// 	//THE time(in ms) that the progress bar will be delayed to show
// 	public static final int MS_GAME_PROGRESS_BAR_DELAY = 500; 
// 	
// }


import org.joda.time.DateTime;
import com.marspotato.supportsmallshop.BO.Shop;
import com.marspotato.supportsmallshop.util.Config;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

		intent.putExtra("helperId", helperId);
		setResult(RESULT_OK, intent);
		super.finish();
	}
	public boolean onOptionsItemSelected(MenuItem item) {
	    if (item.getItemId() == android.R.id.home) {
	        finish();
	        return true;
	    } else {
	        return super.onOptionsItemSelected(item);
	    }
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.shop_detail);
		getActionBar().setDisplayHomeAsUpEnabled(true);
		
		Intent intent = getIntent();
		if (savedInstanceState != null)
		{
			regId = savedInstanceState.getString("regId");
			helperId = savedInstanceState.getString("helperId");	
			shop = (Shop) savedInstanceState.getSerializable("shop");
		}
		else
		{
			regId = intent.getStringExtra("regId");
			helperId = intent.getStringExtra("helperId");

// Path: src/com/marspotato/supportsmallshop/BO/Shop.java
// public class Shop implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 	
// 	@Expose
// 	public String id;
// 	@Expose
// 	public String name;
// 	@Expose
// 	public String shortDescription;
// 	@Expose
// 	public String fullDescription;
// 	@Expose
// 	public String searchTags;
// 	@Expose
// 	public String shopType;
// 	@Expose
// 	public String openHours;
// 	@Expose
// 	public int district;
// 	@Expose
// 	public String address;
// 	@Expose
// 	public String phone;
// 	@Expose
// 	public int latitude1000000; /* the value of latitude * 1000000, the Accuracy is ~0.1m */
// 	@Expose
// 	public int longitude1000000; /* the value of longitude * 1000000, the Accuracy is ~0.1m */
// 	@Expose
// 	public String photoUrl;
// }
// 
// Path: src/com/marspotato/supportsmallshop/util/Config.java
// public class Config {	
// 	//some enum about network
// 	public static int WIFI_ERROR = 0;
// 	public static int NETWORK_ERROR = 1;
// 	public static int OTHERS_ERROR = 2;
// 	
// 	public static int NAME_MAX_LENGTH = 20;
// 	public static int SHORT_DESCRIPTION_MAX_LENGTH = 30;
// 	public static int FULL_DESCRIPTION_MAX_LENGTH = 200;
// 	public static int OPEN_HOURS_MAX_LENGTH = 100;
// 	public static int SEARCH_TAGS_MAX_LENGTH = 200;
// 	public static int ADDRESS_MAX_LENGTH = 150;
// 	public static int PHONE_MAX_LENGTH = 10;
// 	
// 	public final static String licenseUrl = "http://www.gnu.org/licenses/gpl-3.0.txt";
// 	public final static String[] shopTypes = new String[]{"食肆", "零售（食物）","零售（其他）", "服務"}; 
// 	public final static String deviceType  = "google-android"; 
// 	
// 	public final static int DEFAULT_SEARCH_RANGE = 100;
// 	
// 	public final static int WHOLE_HK = 0;
// 	public final static int HK_ISLAND = 1;
// 	public final static int KOWL0ON = 2;	
// 	public final static int NEW_TERRITORIES = 3;
// 	
// 	public final static int HK_NORTH_LAT1000000 = 22562222;
// 	public final static int HK_SOUTH_LAT1000000 = 22153889;
// 	public final static int HK_EAST_LNG1000000 = 114441667;
// 	public final static int HK_WEST_LNG1000000 = 113835278;
// 	
// 	//REMARKS: this is development purpose ID, and URL
// 	public static final String GCM_SENDER_ID = "458074465130";
// 	public static final String HOST_URL = "http://supportsmallshop1.marspotato.com//supportsmallshop";
// 	//public static final String HOST_URL = "http://supportsmallshop.marspotato.com/supportsmallshop";
// 	
// 	//the default http timeout
// 	public static final int DEFAULT_HTTP_TIMEOUT = 10000;//10000ms = 10 seconds
// 	
// 	//after the initial fail, the number of retry of http call
// 	public static final int DEFAULT_HTTP_MAX_RETRY = 1;
// 	
// 	//max number of image to be cached in disk
// 	public static final int MAX_DISK_CACHE_IMAGE = 100;
// 	
// 	public static DateTimeFormatter defaultDisplayDateFormatter = DateTimeFormat.forPattern("yyyy-MM-dd");
// 
// 	public static DateTimeFormatter defaultDateTimeFormatter = ISODateTimeFormat.basicDateTimeNoMillis();
// 	
// 	public static Gson defaultGSON = new GsonBuilder().registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create();
// 	
// 	//time for a button to be disabled to avoid double action
// 	public static final int AVOID_DOUBLE_CLICK_PERIOD = 500;//500ms
// 	
// 	//THE time(in ms) that the progress bar will be delayed to show
// 	public static final int MS_GAME_PROGRESS_BAR_DELAY = 500; 
// 	
// }


// Path: src/com/marspotato/supportsmallshop/ShopDetailActivity.java
import org.joda.time.DateTime;
import com.marspotato.supportsmallshop.BO.Shop;
import com.marspotato.supportsmallshop.util.Config;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

		intent.putExtra("helperId", helperId);
		setResult(RESULT_OK, intent);
		super.finish();
	}
	public boolean onOptionsItemSelected(MenuItem item) {
	    if (item.getItemId() == android.R.id.home) {
	        finish();
	        return true;
	    } else {
	        return super.onOptionsItemSelected(item);
	    }
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.shop_detail);
		getActionBar().setDisplayHomeAsUpEnabled(true);
		
		Intent intent = getIntent();
		if (savedInstanceState != null)
		{
			regId = savedInstanceState.getString("regId");
			helperId = savedInstanceState.getString("helperId");	
			shop = (Shop) savedInstanceState.getSerializable("shop");
		}
		else
		{
			regId = intent.getStringExtra("regId");
			helperId = intent.getStringExtra("helperId");

			shop = (Shop) intent.getExtras().getSerializable("shop");
