package com.moral.yunfushao;
|
|
import android.app.Application;
|
import android.bluetooth.BluetoothGattService;
|
|
import com.baidu.mapapi.SDKInitializer;
|
import com.clj.fastble.BleManager;
|
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.cookie.store.PersistentCookieStore;
|
import com.moral.andbrickslib.utils.log.XLog;
|
import com.moral.yunfushao.utils.SharedPreferencesUtil;
|
|
/**
|
* Created by haijiang on 2017/5/2.
|
*/
|
|
public class MainApp extends Application {
|
public static MainApp theApp;
|
//用户id
|
public static String userId;
|
public SharedPreferencesUtil sharedPreferencesUtil;
|
/**
|
* 初始化变蓝牙管理类
|
*/
|
public BleManager bleManager;
|
public BluetoothGattService usrService;
|
@Override
|
public void onCreate() {
|
super.onCreate();
|
this.theApp = this;
|
SDKInitializer.initialize(this);
|
XLog.init("haijiang");
|
OkGo.init(this);
|
OkGo.getInstance().setCookieStore(new PersistentCookieStore());
|
|
if(sharedPreferencesUtil == null){
|
sharedPreferencesUtil = new SharedPreferencesUtil(this);
|
}
|
// userId = sharedPreferencesUtil.getUserid();
|
userId = "1";
|
|
bleManager = new BleManager(this);
|
}
|
}
|