// Path: app/src/main/java/clock/socoolby/com/clock/ClockApplication.java
// public class ClockApplication extends Application {
// 
//     private static ClockApplication sEndzoneBoxApp;
//     private BusinessService mBusinessService = new BusinessService();
// 
//     public static ClockApplication getInstance() {
//         return sEndzoneBoxApp;
//     }
// 
//     @Override
//     public void onCreate() {
//         sEndzoneBoxApp = this;
//         init();
//         super.onCreate();
//     }
// 
// 
//     public void init() {
//         if (!FileUtils.isExistsFile(Constants.SHARE_PERFERENCE_FILE)) {
//             SharePerferenceModel model = new SharePerferenceModel();
//             model.setTypeHourPower(Constants.TALKING_HALF_AN_HOUR);
//             DateModel startTimeModel = new DateModel();
//             startTimeModel.setTime(12, 31);
//             DateModel stopTimeModel = new DateModel();
//             stopTimeModel.setTime(14, 31);
//             model.setStartHourPowerTime(startTimeModel);
//             model.setStopHourPowerTime(stopTimeModel);
//             model.setCity(getString(R.string.shenzhen));
//             model.save();
//         }
//     }
// 
//     public static Context getContext() {
//         return ClockApplication.getInstance().getApplicationContext();
//     }
// 
//     public BusinessService getBusinessService() {
//         return mBusinessService;
//     }
// 
//     private MainActivity mMainActivity;
// 
//     public void setMainActivity(MainActivity mainActivity) {
//         this.mMainActivity = mainActivity;
//     }
// 
//     public MainActivity getMainActivity() {
//         return mMainActivity;
//     }
// 
// }


import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import clock.socoolby.com.clock.ClockApplication;
import clock.socoolby.com.clock.R;
    }

    public JSONObject getTimeLocation() {
        return timeLocation;
    }

    public JSONObject getDateLocation() {
        return dateLocation;
    }

    public JSONObject getDayLocation() {
        return dayLocation;
    }

    public JSONObject getWeatherLocation() {
        return weatherLocation;
    }

    public JSONObject getDescriptionLocation() {
        return descriptionLocation;
    }

    private void fromJsonString(String jsonString) {
        try {
            JSONObject jsonObject = new JSONObject(jsonString);
            typeHourPower = jsonObject.getInt(KEY_TYPE_HOUR_POWER);
            isDisplaySecond = jsonObject.getBoolean(KEY_IS_DISPLAY_SECOND);
            isTickSound = jsonObject.getBoolean(KEY_IS_TICK_SOUND);
            isTriggerScreen =jsonObject.optBoolean(KEY_IS_TRIGGER_SCREEN,true);
            mCity = jsonObject.getString(KEY_CITY);
// Path: app/src/main/java/clock/socoolby/com/clock/ClockApplication.java
// public class ClockApplication extends Application {
// 
//     private static ClockApplication sEndzoneBoxApp;
//     private BusinessService mBusinessService = new BusinessService();
// 
//     public static ClockApplication getInstance() {
//         return sEndzoneBoxApp;
//     }
// 
//     @Override
//     public void onCreate() {
//         sEndzoneBoxApp = this;
//         init();
//         super.onCreate();
//     }
// 
// 
//     public void init() {
//         if (!FileUtils.isExistsFile(Constants.SHARE_PERFERENCE_FILE)) {
//             SharePerferenceModel model = new SharePerferenceModel();
//             model.setTypeHourPower(Constants.TALKING_HALF_AN_HOUR);
//             DateModel startTimeModel = new DateModel();
//             startTimeModel.setTime(12, 31);
//             DateModel stopTimeModel = new DateModel();
//             stopTimeModel.setTime(14, 31);
//             model.setStartHourPowerTime(startTimeModel);
//             model.setStopHourPowerTime(stopTimeModel);
//             model.setCity(getString(R.string.shenzhen));
//             model.save();
//         }
//     }
// 
//     public static Context getContext() {
//         return ClockApplication.getInstance().getApplicationContext();
//     }
// 
//     public BusinessService getBusinessService() {
//         return mBusinessService;
//     }
// 
//     private MainActivity mMainActivity;
// 
//     public void setMainActivity(MainActivity mainActivity) {
//         this.mMainActivity = mainActivity;
//     }
// 
//     public MainActivity getMainActivity() {
//         return mMainActivity;
//     }
// 
// }


// Path: app/src/main/java/clock/socoolby/com/clock/utils/SharePerferenceModel.java
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import clock.socoolby.com.clock.ClockApplication;
import clock.socoolby.com.clock.R;

    }

    public JSONObject getTimeLocation() {
        return timeLocation;
    }

    public JSONObject getDateLocation() {
        return dateLocation;
    }

    public JSONObject getDayLocation() {
        return dayLocation;
    }

    public JSONObject getWeatherLocation() {
        return weatherLocation;
    }

    public JSONObject getDescriptionLocation() {
        return descriptionLocation;
    }

    private void fromJsonString(String jsonString) {
        try {
            JSONObject jsonObject = new JSONObject(jsonString);
            typeHourPower = jsonObject.getInt(KEY_TYPE_HOUR_POWER);
            isDisplaySecond = jsonObject.getBoolean(KEY_IS_DISPLAY_SECOND);
            isTickSound = jsonObject.getBoolean(KEY_IS_TICK_SOUND);
            isTriggerScreen =jsonObject.optBoolean(KEY_IS_TRIGGER_SCREEN,true);
            mCity = jsonObject.getString(KEY_CITY);
            mDescription = jsonObject.optString(KEY_DESCRPTION, ClockApplication.getContext().getResources().getString(R.string.always_zuo_never_die));