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.6";
|
|
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);
|
}
|
}
|