package cgmblelib.utils;

import android.Manifest;
import android.os.Build;

import androidx.annotation.Keep;
import androidx.annotation.RequiresApi;

/**
 * Created by minyuchun on 2018/8/28.
 * 全局常量类，只与cgm有关
 *
 * @author minyuchun
 */
@Keep
public class ConstantsLibrary {

    /**
     * 是否需要登陆模块
     */
    public static final boolean IS_SIGN_IN = true;
    public static final boolean CHART_ANIM = true;
    /**
     * 是否是测试缓解,正式环境为 false
     */
    public final static boolean IS_TEST = false;
    /**
     * 是否可以进行截屏,true 表示可以截图,正式环境为 false
     */
    public final static boolean IS_SCREENSHOT_ABLE = true;

    //所有日志写入同一个csv文件夹
    public static final boolean IS_ALLINCSV = false;
    /**
     * 在push 数据之后获取所有采集的电流值 -- 会增加功耗
     */
    public static final boolean IS_PULL_ALL_CURRENT_AFTER_PUSH_CT3 = false;
    /**
     * 定时(秒)断开连接 -- 测试使用 2021-12-06, 0 时取消
     */
    public static final int TIME_SECONDS_DISCONNECT = 0;

    public static final String[] SYNCHRONOUS_DATA = null;
    /**
     * 使用的算法版本,在数据库device中得到体现
     */
    public static final int ALGORITHM_VERSION = 2;
    /**
     * 接收到血糖时间间隔 -- 单位分钟
     */
    public static final int GLUCOSE_DATA_INTERVAL = 3;

    /**
     * 高血糖限(mm) 默认-
     */
    public static final float LIMIT_HYPERGLYCEMIA_MM_DEFAULT = 11.1f;
    /**
     * 低血糖限(mm) 默认-
     */
    public static final float LIMIT_HYPOGLYCEMIA_MM_DEFAULT = 3.9f;

    /**
     * 权限 -- 获取定位权限，用于app蓝牙搜索
     */
    @RequiresApi(api = Build.VERSION_CODES.S)
    public static final String[] BLUETOOTH_S = new String[]{
            Manifest.permission.BLUETOOTH_ADVERTISE,
            Manifest.permission.BLUETOOTH_CONNECT,
            Manifest.permission.BLUETOOTH_SCAN};

    /**
     * 权限 -- 获取定位权限，用于app蓝牙搜索
     */
    public static final String[] LOCAL_PERMISSION = new String[]{
            Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.ACCESS_COARSE_LOCATION};

    @RequiresApi(api = Build.VERSION_CODES.Q)
    public static final String[] BACKGROUND_LOCATION_Q = new String[]{
            Manifest.permission.ACCESS_BACKGROUND_LOCATION
    };
    /**
     * 权限允许在后台运行
     */
    public static final String[] CAMERA_PERMISSION = new String[]{
            Manifest.permission.CAMERA
    };
}
