| | |
| | | import android.app.Application; |
| | | import android.content.Context; |
| | | import android.support.multidex.MultiDex; |
| | | |
| | | import com.baidu.mapapi.SDKInitializer; |
| | | import com.lzy.okgo.OkGo; |
| | | import com.lzy.okgo.cookie.store.PersistentCookieStore; |
| | | import com.moral.andbrickslib.utils.ScreenUtils; |
| | | import com.moral.andbrickslib.utils.log.XLog; |
| | | import com.moral.screen.utils.SharedPreferencesUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | public class MainApp extends Application { |
| | | public static MainApp theApp; |
| | | public SharedPreferencesUtil mSharedPreferencesUtil; |
| | | //用户id |
| | | public int userId = 0; |
| | | public int orgId = 0; |
| | | public int width; |
| | | @Override |
| | | public void onCreate() { |
| | |
| | | this.theApp = this; |
| | | XLog.init("haijiang"); |
| | | width = ScreenUtils.getScreenWidth(this); |
| | | if(mSharedPreferencesUtil==null){ |
| | | mSharedPreferencesUtil = new SharedPreferencesUtil(this); |
| | | } |
| | | orgId = mSharedPreferencesUtil.getOrgId(); |
| | | OkGo.init(this); |
| | | OkGo.getInstance().setCookieStore(new PersistentCookieStore()); |
| | | SDKInitializer.initialize(getApplicationContext()); |
| | | } |
| | | |
| | | @Override |