|
|
@@ -33,251 +33,270 @@ import org.apache.http.cookie.Cookie;
|
|
|
import java.io.File;
|
|
|
|
|
|
public class MyApplication extends Application {
|
|
|
-
|
|
|
- /**@注释:记录Cookie */
|
|
|
-
|
|
|
- public String JSESSION_B2B;
|
|
|
- public static Cookie cookie;
|
|
|
-
|
|
|
-
|
|
|
- private static MyApplication INSTANCE = null;
|
|
|
-
|
|
|
- public static MyApplication getInstance() {
|
|
|
- return INSTANCE;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onCreate() {
|
|
|
- super.onCreate();
|
|
|
- INSTANCE = this;
|
|
|
- PreferenceUtils.putBoolean(this, Constants.IS_NOTIFICATION, false);//不进行通知
|
|
|
- new Handler().postDelayed(new Runnable() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- //定位场景设置
|
|
|
- MobclickAgent.setScenarioType(MyApplication.this, MobclickAgent.EScenarioType. E_UM_NORMAL);
|
|
|
-
|
|
|
- SDKInitializer.initialize(getApplicationContext());
|
|
|
- // 初始化数据库
|
|
|
- SQLiteHelper.copyDatabaseFile(getApplicationContext());
|
|
|
- // 初始化定位
|
|
|
- getBdLocationHelper();
|
|
|
- // 初始化App目录
|
|
|
- initAppDir();
|
|
|
- // 初始化图片加载
|
|
|
- initImageLoader();
|
|
|
- }
|
|
|
- }, 1);
|
|
|
- if (AppConfig.DEBUG) {
|
|
|
- Log.d(AppConfig.TAG, "MyApplication onCreate");
|
|
|
- }
|
|
|
- if (AppConfig.DEBUG) {
|
|
|
- StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
|
|
|
- StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
|
|
|
- }
|
|
|
- // 初始化网络监听
|
|
|
- mNetWorkObservable = new NetWorkObservable(this);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 在程序内部关闭时,调用此方法
|
|
|
- */
|
|
|
- public void destory() {
|
|
|
- if (AppConfig.DEBUG) {
|
|
|
- Log.d(AppConfig.TAG, "MyApplication destory");
|
|
|
- }
|
|
|
- // 结束百度定位
|
|
|
- if (mBdLocationHelper != null) {
|
|
|
- mBdLocationHelper.release();
|
|
|
- }
|
|
|
- // 关闭网络状态的监听
|
|
|
- if (mNetWorkObservable != null) {
|
|
|
- mNetWorkObservable.release();
|
|
|
- }
|
|
|
- // 清除图片加载
|
|
|
- ImageLoader.getInstance().destroy();
|
|
|
- //
|
|
|
- releaseFastVolley();
|
|
|
- // 释放数据库
|
|
|
- // SQLiteHelper.release();
|
|
|
- android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
- }
|
|
|
-
|
|
|
- /********************* 百度地图定位服务 ************************/
|
|
|
- private BdLocationHelper mBdLocationHelper;
|
|
|
-
|
|
|
- public BdLocationHelper getBdLocationHelper() {
|
|
|
- if (mBdLocationHelper == null) {
|
|
|
- mBdLocationHelper = new BdLocationHelper(this);
|
|
|
- }
|
|
|
- return mBdLocationHelper;
|
|
|
- }
|
|
|
-
|
|
|
- /********************* 提供网络全局监听 ************************/
|
|
|
- private NetWorkObservable mNetWorkObservable;
|
|
|
-
|
|
|
- public boolean isNetworkActive() {
|
|
|
- if (mNetWorkObservable != null) {
|
|
|
- return mNetWorkObservable.isNetworkActive();
|
|
|
- }
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- public void registerNetWorkObserver(NetWorkObservable.NetWorkObserver observer) {
|
|
|
- if (mNetWorkObservable != null) {
|
|
|
- mNetWorkObservable.registerObserver(observer);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public void unregisterNetWorkObserver(NetWorkObservable.NetWorkObserver observer) {
|
|
|
- if (mNetWorkObservable != null) {
|
|
|
- mNetWorkObservable.unregisterObserver(observer);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /* 文件缓存的目录 */
|
|
|
- public String mAppDir;
|
|
|
- public String mPicturesDir;
|
|
|
- public String mVoicesDir;
|
|
|
- public String mVideosDir;
|
|
|
- public String mFilesDir;
|
|
|
-
|
|
|
- private void initAppDir() {
|
|
|
- File file = getExternalFilesDir(null);
|
|
|
- if(file!=null) {
|
|
|
- if (!file.exists()) {
|
|
|
- file.mkdirs();
|
|
|
- }
|
|
|
- mAppDir = file.getAbsolutePath();
|
|
|
- }
|
|
|
-
|
|
|
- file = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
|
|
|
- if(file!=null) {
|
|
|
- if (!file.exists()) {
|
|
|
- file.mkdirs();
|
|
|
- }
|
|
|
- mPicturesDir = file.getAbsolutePath();
|
|
|
- }
|
|
|
-
|
|
|
- file = getExternalFilesDir(Environment.DIRECTORY_MUSIC);
|
|
|
- if(file!=null) {
|
|
|
- if (!file.exists()) {
|
|
|
- file.mkdirs();
|
|
|
- }
|
|
|
- mVoicesDir = file.getAbsolutePath();
|
|
|
- }
|
|
|
- file = getExternalFilesDir(Environment.DIRECTORY_MOVIES);
|
|
|
- if(file!=null) {
|
|
|
- if (!file.exists()) {
|
|
|
- file.mkdirs();
|
|
|
- }
|
|
|
- mVideosDir = file.getAbsolutePath();
|
|
|
- }
|
|
|
- file = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
|
|
- if(file!=null) {
|
|
|
- if (!file.exists()) {
|
|
|
- file.mkdirs();
|
|
|
- }
|
|
|
- mFilesDir = file.getAbsolutePath();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /******************* 初始化图片加载 **********************/
|
|
|
- // 显示的设置
|
|
|
- public static DisplayImageOptions mNormalImageOptions;
|
|
|
- public static DisplayImageOptions mAvatarRoundImageOptions;
|
|
|
- public static DisplayImageOptions mAvatarNormalImageOptions;
|
|
|
-
|
|
|
- private void initImageLoader() {
|
|
|
- int memoryCacheSize = (int) (Runtime.getRuntime().maxMemory() / 5);
|
|
|
- MemoryCacheAware<String, Bitmap> memoryCache;
|
|
|
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
|
|
- memoryCache = new LruMemoryCache(memoryCacheSize);
|
|
|
- } else {
|
|
|
- memoryCache = new LRULimitedMemoryCache(memoryCacheSize);
|
|
|
- }
|
|
|
-
|
|
|
- mNormalImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
- .resetViewBeforeLoading(false).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.image_download_fail_icon)
|
|
|
- .showImageOnFail(com.xzjmyk.pm.activity.R.drawable.image_download_fail_icon).build();
|
|
|
-
|
|
|
- mAvatarRoundImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
- .displayer(new RoundedBitmapDisplayer(10)).resetViewBeforeLoading(true).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.avatar_normal)
|
|
|
- .showImageOnFail(com.xzjmyk.pm.activity.R.drawable.avatar_normal).showImageOnLoading(com.xzjmyk.pm.activity.R.drawable.avatar_normal).build();
|
|
|
-
|
|
|
- mAvatarNormalImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
- .resetViewBeforeLoading(true).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.avatar_normal).showImageOnFail(com.xzjmyk.pm.activity.R.drawable.avatar_normal)
|
|
|
- .showImageOnLoading(com.xzjmyk.pm.activity.R.drawable.avatar_normal).build();
|
|
|
-
|
|
|
- ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).defaultDisplayImageOptions(mNormalImageOptions)
|
|
|
- // .denyCacheImageMultipleSizesInMemory()
|
|
|
- .discCache(new TotalSizeLimitedDiscCache(new File(mPicturesDir), 50 * 1024 * 1024))
|
|
|
- // 最多缓存50M的图片
|
|
|
- .discCacheFileNameGenerator(new Md5FileNameGenerator()).memoryCache(memoryCache).tasksProcessingOrder(QueueProcessingType.LIFO)
|
|
|
- .threadPriority(Thread.NORM_PRIORITY - 2).threadPoolSize(4).build();
|
|
|
- // Initialize ImageLoader with configuration.
|
|
|
- ImageLoader.getInstance().init(config);
|
|
|
- }
|
|
|
-
|
|
|
- /********************* 提供全局配置 ************************/
|
|
|
- private AppConfig mConfig;
|
|
|
-
|
|
|
- public void setConfig(AppConfig config) {
|
|
|
- mConfig = config;
|
|
|
- }
|
|
|
-
|
|
|
- public AppConfig getConfig() {
|
|
|
- if (mConfig == null) {
|
|
|
- mConfig = AppConfig.initConfig(getApplicationContext(), new ConfigBean());
|
|
|
- }
|
|
|
- return mConfig;
|
|
|
- }
|
|
|
-
|
|
|
- /***************** 提供全局的Volley ***************************/
|
|
|
-
|
|
|
- private FastVolley mFastVolley;
|
|
|
-
|
|
|
- public FastVolley getFastVolley() {
|
|
|
- if (mFastVolley == null) {
|
|
|
- synchronized (MyApplication.class) {
|
|
|
- if (mFastVolley == null) {
|
|
|
- mFastVolley = new FastVolley(this);
|
|
|
- mFastVolley.start();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return mFastVolley;
|
|
|
- }
|
|
|
-
|
|
|
- private void releaseFastVolley() {
|
|
|
- if (mFastVolley != null) {
|
|
|
- mFastVolley.stop();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*********************** 保存当前登陆用户的全局信息 ***************/
|
|
|
- public String roomName;
|
|
|
- public String mAccessToken;
|
|
|
- public long mExpiresIn;
|
|
|
- public int mUserStatus;
|
|
|
- public boolean mUserStatusChecked = false;
|
|
|
- public User mLoginUser = new User();// 当前登陆的用户
|
|
|
-
|
|
|
- /*********************** 保存其他用户坐标信息 ***************/
|
|
|
-
|
|
|
- public String getJSESSION_B2B() {
|
|
|
- return JSESSION_B2B;
|
|
|
- }
|
|
|
- public void setJSESSION_B2B(String jSESSION_B2B) {
|
|
|
- JSESSION_B2B = jSESSION_B2B;
|
|
|
- }
|
|
|
-
|
|
|
- public static Cookie getCookie() {
|
|
|
- return cookie;
|
|
|
- }
|
|
|
-
|
|
|
- public static void setCookie(Cookie cookie) {
|
|
|
- MyApplication.cookie = cookie;
|
|
|
- }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @注释:记录Cookie
|
|
|
+ */
|
|
|
+
|
|
|
+ public String JSESSION_B2B;
|
|
|
+ public static Cookie cookie;
|
|
|
+
|
|
|
+
|
|
|
+ private static MyApplication INSTANCE = null;
|
|
|
+
|
|
|
+ public static MyApplication getInstance() {
|
|
|
+ return INSTANCE;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onCreate() {
|
|
|
+ super.onCreate();
|
|
|
+ INSTANCE = this;
|
|
|
+ PreferenceUtils.putBoolean(this, Constants.IS_NOTIFICATION, false);//不进行通知
|
|
|
+ new Handler().postDelayed(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ //定位场景设置
|
|
|
+ MobclickAgent.setScenarioType(MyApplication.this, MobclickAgent.EScenarioType.E_UM_NORMAL);
|
|
|
+
|
|
|
+ SDKInitializer.initialize(getApplicationContext());
|
|
|
+ // 初始化数据库
|
|
|
+ SQLiteHelper.copyDatabaseFile(getApplicationContext());
|
|
|
+ // 初始化定位
|
|
|
+ getBdLocationHelper();
|
|
|
+ // 初始化App目录
|
|
|
+ initAppDir();
|
|
|
+ // 初始化图片加载
|
|
|
+ initImageLoader();
|
|
|
+ }
|
|
|
+ }, 1);
|
|
|
+ if (AppConfig.DEBUG) {
|
|
|
+ Log.d(AppConfig.TAG, "MyApplication onCreate");
|
|
|
+ }
|
|
|
+ if (AppConfig.DEBUG) {
|
|
|
+ StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
|
|
|
+ StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
|
|
|
+ }
|
|
|
+ // 初始化网络监听
|
|
|
+ mNetWorkObservable = new NetWorkObservable(this);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 在程序内部关闭时,调用此方法
|
|
|
+ */
|
|
|
+ public void destory() {
|
|
|
+ if (AppConfig.DEBUG) {
|
|
|
+ Log.d(AppConfig.TAG, "MyApplication destory");
|
|
|
+ }
|
|
|
+ // 结束百度定位
|
|
|
+ if (mBdLocationHelper != null) {
|
|
|
+ mBdLocationHelper.release();
|
|
|
+ }
|
|
|
+ // 关闭网络状态的监听
|
|
|
+ if (mNetWorkObservable != null) {
|
|
|
+ mNetWorkObservable.release();
|
|
|
+ }
|
|
|
+ // 清除图片加载
|
|
|
+ ImageLoader.getInstance().destroy();
|
|
|
+ //
|
|
|
+ releaseFastVolley();
|
|
|
+ // 释放数据库
|
|
|
+ // SQLiteHelper.release();
|
|
|
+ android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
+ }
|
|
|
+
|
|
|
+ /*********************
|
|
|
+ * 百度地图定位服务
|
|
|
+ ************************/
|
|
|
+ private BdLocationHelper mBdLocationHelper;
|
|
|
+
|
|
|
+ public BdLocationHelper getBdLocationHelper() {
|
|
|
+ if (mBdLocationHelper == null) {
|
|
|
+ mBdLocationHelper = new BdLocationHelper(this);
|
|
|
+ }
|
|
|
+ return mBdLocationHelper;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*********************
|
|
|
+ * 提供网络全局监听
|
|
|
+ ************************/
|
|
|
+ private NetWorkObservable mNetWorkObservable;
|
|
|
+
|
|
|
+ public boolean isNetworkActive() {
|
|
|
+ if (mNetWorkObservable != null) {
|
|
|
+ return mNetWorkObservable.isNetworkActive();
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void registerNetWorkObserver(NetWorkObservable.NetWorkObserver observer) {
|
|
|
+ if (mNetWorkObservable != null) {
|
|
|
+ mNetWorkObservable.registerObserver(observer);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void unregisterNetWorkObserver(NetWorkObservable.NetWorkObserver observer) {
|
|
|
+ if (mNetWorkObservable != null) {
|
|
|
+ mNetWorkObservable.unregisterObserver(observer);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 文件缓存的目录 */
|
|
|
+ public String mAppDir;
|
|
|
+ public String mPicturesDir;
|
|
|
+ public String mVoicesDir;
|
|
|
+ public String mVideosDir;
|
|
|
+ public String mFilesDir;
|
|
|
+
|
|
|
+ private void initAppDir() {
|
|
|
+ File file = getExternalFilesDir(null);
|
|
|
+ if (file != null) {
|
|
|
+ if (!file.exists()) {
|
|
|
+ file.mkdirs();
|
|
|
+ }
|
|
|
+ mAppDir = file.getAbsolutePath();
|
|
|
+ }
|
|
|
+
|
|
|
+ file = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
|
|
|
+ if (file != null) {
|
|
|
+ if (!file.exists()) {
|
|
|
+ file.mkdirs();
|
|
|
+ }
|
|
|
+ mPicturesDir = file.getAbsolutePath();
|
|
|
+ }
|
|
|
+
|
|
|
+ file = getExternalFilesDir(Environment.DIRECTORY_MUSIC);
|
|
|
+ if (file != null) {
|
|
|
+ if (!file.exists()) {
|
|
|
+ file.mkdirs();
|
|
|
+ }
|
|
|
+ mVoicesDir = file.getAbsolutePath();
|
|
|
+ }
|
|
|
+ file = getExternalFilesDir(Environment.DIRECTORY_MOVIES);
|
|
|
+ if (file != null) {
|
|
|
+ if (!file.exists()) {
|
|
|
+ file.mkdirs();
|
|
|
+ }
|
|
|
+ mVideosDir = file.getAbsolutePath();
|
|
|
+ }
|
|
|
+ file = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
|
|
+ if (file != null) {
|
|
|
+ if (!file.exists()) {
|
|
|
+ file.mkdirs();
|
|
|
+ }
|
|
|
+ mFilesDir = file.getAbsolutePath();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /*******************
|
|
|
+ * 初始化图片加载
|
|
|
+ **********************/
|
|
|
+ // 显示的设置
|
|
|
+ public static DisplayImageOptions mNormalImageOptions;
|
|
|
+ public static DisplayImageOptions mAvatarRoundImageOptions;
|
|
|
+ public static DisplayImageOptions mAvatarNormalImageOptions;
|
|
|
+
|
|
|
+ private void initImageLoader() {
|
|
|
+ int memoryCacheSize = (int) (Runtime.getRuntime().maxMemory() / 5);
|
|
|
+ MemoryCacheAware<String, Bitmap> memoryCache;
|
|
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
|
|
+ memoryCache = new LruMemoryCache(memoryCacheSize);
|
|
|
+ } else {
|
|
|
+ memoryCache = new LRULimitedMemoryCache(memoryCacheSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ mNormalImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
+ .resetViewBeforeLoading(false).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.image_download_fail_icon)
|
|
|
+ .showImageOnFail(com.xzjmyk.pm.activity.R.drawable.image_download_fail_icon).build();
|
|
|
+
|
|
|
+ mAvatarRoundImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
+ .displayer(new RoundedBitmapDisplayer(10)).resetViewBeforeLoading(true).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.avatar_normal)
|
|
|
+ .showImageOnFail(com.xzjmyk.pm.activity.R.drawable.avatar_normal).showImageOnLoading(com.xzjmyk.pm.activity.R.drawable.avatar_normal).build();
|
|
|
+
|
|
|
+ mAvatarNormalImageOptions = new DisplayImageOptions.Builder().bitmapConfig(Config.RGB_565).cacheInMemory(true).cacheOnDisc(true)
|
|
|
+ .resetViewBeforeLoading(true).showImageForEmptyUri(com.xzjmyk.pm.activity.R.drawable.avatar_normal).showImageOnFail(com.xzjmyk.pm.activity.R.drawable.avatar_normal)
|
|
|
+ .showImageOnLoading(com.xzjmyk.pm.activity.R.drawable.avatar_normal).build();
|
|
|
+
|
|
|
+ ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).defaultDisplayImageOptions(mNormalImageOptions)
|
|
|
+ // .denyCacheImageMultipleSizesInMemory()
|
|
|
+ .discCache(new TotalSizeLimitedDiscCache(new File(mPicturesDir), 50 * 1024 * 1024))
|
|
|
+ // 最多缓存50M的图片
|
|
|
+ .discCacheFileNameGenerator(new Md5FileNameGenerator()).memoryCache(memoryCache).tasksProcessingOrder(QueueProcessingType.LIFO)
|
|
|
+ .threadPriority(Thread.NORM_PRIORITY - 2)
|
|
|
+ .threadPoolSize(4)
|
|
|
+ .build();
|
|
|
+ // Initialize ImageLoader with configuration.
|
|
|
+ ImageLoader.getInstance().init(config);
|
|
|
+ }
|
|
|
+
|
|
|
+ /*********************
|
|
|
+ * 提供全局配置
|
|
|
+ ************************/
|
|
|
+ private AppConfig mConfig;
|
|
|
+
|
|
|
+ public void setConfig(AppConfig config) {
|
|
|
+ mConfig = config;
|
|
|
+ }
|
|
|
+
|
|
|
+ public AppConfig getConfig() {
|
|
|
+ if (mConfig == null) {
|
|
|
+ mConfig = AppConfig.initConfig(getApplicationContext(), new ConfigBean());
|
|
|
+ }
|
|
|
+ return mConfig;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*****************
|
|
|
+ * 提供全局的Volley
|
|
|
+ ***************************/
|
|
|
+
|
|
|
+ private FastVolley mFastVolley;
|
|
|
+
|
|
|
+ public FastVolley getFastVolley() {
|
|
|
+ if (mFastVolley == null) {
|
|
|
+ synchronized (MyApplication.class) {
|
|
|
+ if (mFastVolley == null) {
|
|
|
+ mFastVolley = new FastVolley(this);
|
|
|
+ mFastVolley.start();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return mFastVolley;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void releaseFastVolley() {
|
|
|
+ if (mFastVolley != null) {
|
|
|
+ mFastVolley.stop();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /***********************
|
|
|
+ * 保存当前登陆用户的全局信息
|
|
|
+ ***************/
|
|
|
+ public String roomName;
|
|
|
+ public String mAccessToken;
|
|
|
+ public long mExpiresIn;
|
|
|
+ public int mUserStatus;
|
|
|
+ public boolean mUserStatusChecked = false;
|
|
|
+ public User mLoginUser = new User();// 当前登陆的用户
|
|
|
+
|
|
|
+ /***********************
|
|
|
+ * 保存其他用户坐标信息
|
|
|
+ ***************/
|
|
|
+
|
|
|
+ public String getJSESSION_B2B() {
|
|
|
+ return JSESSION_B2B;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setJSESSION_B2B(String jSESSION_B2B) {
|
|
|
+ JSESSION_B2B = jSESSION_B2B;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Cookie getCookie() {
|
|
|
+ return cookie;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void setCookie(Cookie cookie) {
|
|
|
+ MyApplication.cookie = cookie;
|
|
|
+ }
|
|
|
}
|