package com.ahau.againstpestinfo.utils;

import android.os.Environment;

import java.io.File;

/**
 * 注释:
 *
 * @author fanchunchun
 * @date 2018/5/6
 */

public class Settings {
    public static final String ROOT = Environment.getExternalStorageDirectory().getPath();
    public static final String TEMPORARY_DIR = ROOT + "/teaassistant/temp/";
    public static final String CACHE_DIR = ROOT + "/teaassistant/cache/";
    public static final String TEST=ROOT+"/teaassistant/test/";
    public static final String CACHE_CONSISTANTS_DIR = CACHE_DIR + "consistant/";

    public static final String TAKE_PHOTO_FILE = TEMPORARY_DIR + "take_photo_temp.jpg";
    public static final String TAKE_PHOTO_FILE1 = TEMPORARY_DIR + "take_photo_temp1.jpg";
    public static final String TAKE_PHOTO_FILE2 = TEMPORARY_DIR + "take_photo_temp2.jpg";
    public static final String TAKE_PHOTO_FILE_DEST = TEMPORARY_DIR + "take_photo.jpg";

    public static final String AUDIO_RECORDER_PATH =TEMPORARY_DIR+"recorder.mp4";
    public static final String IS_SHOPPING ="is_shopping";

    public static final String AREA_CACHE_FILE = CACHE_CONSISTANTS_DIR + "area.txt";
    public static final String CROPKIND_CACHE_FILE = CACHE_CONSISTANTS_DIR + "cropKind.txt";
    public static final String CONSULT_CACHE_FILE = CACHE_CONSISTANTS_DIR + "consult.txt";
    public static final String USER_INFO_CACHE_FILE = CACHE_CONSISTANTS_DIR + "userinfo.txt";
    public static final String CROP_KINDS_CACHE_FILE = CACHE_CONSISTANTS_DIR + "cropKinds.txt";
    public static final String SYSTEM_INFO_CACHE_FILE = CACHE_CONSISTANTS_DIR + "systemInfo.txt";
    public static final String LOGIN_SUCCESS = "login_success";
    public static boolean LOGIN_FLAG ;
    public static boolean EXPERT_LOGIN_FLAG ;
    public static boolean SHOP_LOGIN_FLAG ;
    public static void createAppDirs() {
        File dirFile = new File(TEMPORARY_DIR);
        if (!dirFile.exists()) {
            dirFile.mkdirs();
        }
        dirFile = new File(CACHE_CONSISTANTS_DIR);
        if (!dirFile.exists()) {
            dirFile.mkdirs();
        }
    }
}
