| | |
| | | |
| | | import org.xutils.x; |
| | | |
| | | /** |
| | | * Created by zhangbo on 2017/2/15. |
| | | */ |
| | | |
| | | public class BaseApplication extends Application{ |
| | | |
| | | private static BaseApplication application; |
| | |
| | | |
| | | private Device device; |
| | | |
| | | public static boolean deviceAvailable = false; |
| | | |
| | | public void setDevice(Device device) { |
| | | this.device = device; |
| | | if (device != null && device.getDeviceId() != null && !"".equals(device.getDeviceId())) { |
| | | deviceAvailable = true; |
| | | DictionaryMng.getInstance().loadAllDictionaryData(); |
| | | } |
| | | } |
| | | |
| | | public Device getDevice() { |
| | |
| | | Fresco.initialize(this); |
| | | initOkHttpUtils(); |
| | | application = this; |
| | | DeviceMng.getInstance().findPlace(); |
| | | DictionaryMng.getInstance().loadAllDictionaryData(); |
| | | DeviceMng.getInstance().findDevice(); |
| | | } |
| | | |
| | | private void initOkHttpUtils() { |