hxb
2022-03-21 0188dee359636723190f0f67a6b674b7b08f7bef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.hdl.sdk.common;
 
import android.content.Context;
 
import com.hdl.sdk.common.utils.LogUtils;
 
/**
 * Created by Tong on 2021/9/28.
 */
public class HDLSdk {
 
    private Context context;
 
    /**
     * 获取当前版本
     * @return
     */
    public String getVersion() {
        return version;
    }
 
    private String version="1.0.8";
 
    private HDLSdk() {
    }
 
    private static class SingletonInstance {
        private static final HDLSdk INSTANCE = new HDLSdk();
    }
 
    public static HDLSdk getInstance() {
        return SingletonInstance.INSTANCE;
    }
 
    public void init(Context context) {
        this.context = context.getApplicationContext();
        LogUtils.i("Version:" + version);
    }
 
    public Context getContext() {
        return context;
    }
 
    /**
     * 设置打印是否开启
     * @param enable
     */
    public void setLogEnabled(boolean enable){
        LogUtils.setEnabled(enable);
    }
}