List of usage examples for java.io InvalidClassException printStackTrace
public void printStackTrace()
From source file:com.gao.im.ui.ECLauncherUI.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(ECLauncherUI.class), "onResume start"); super.onResume(); ////w w w . j av a2s.c o m MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { startActivity(new Intent(this, LoginActivity.class)); finish(); return; } String[] split = account.split(","); ClientUser user = new ClientUser(split[2]); user.setSubSid(split[0]); user.setSubToken(split[1]); user.setUserToken(split[3]); CCPAppManager.setClientUser(user); SDKCoreHelper.init(this); // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); }
From source file:com.gochina.jclient.ui.LauncherActivity.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(LauncherActivity.class), "onResume start"); super.onResume(); ////from ww w.java 2 s .c o m MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECHandlerHelper.removeCallbacksRunnOnUI(initRunnable); ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ContactsCache.getInstance().stop(); CCPAppManager.setClientUser(null); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { startActivity(new Intent(this, LoginActivity.class)); finish(); return; } // ?? registerReceiver( new String[] { IMChattingHelper.INTENT_ACTION_SYNC_MESSAGE, SDKCoreHelper.ACTION_SDK_CONNECT }); ClientUser user = new ClientUser("").from(account); CCPAppManager.setClientUser(user); if (!ContactSqlManager.hasContact(user.getUserId())) { ECContacts contacts = new ECContacts(); contacts.setClientUser(user); ContactSqlManager.insertContact(contacts); } if (SDKCoreHelper.getConnectState() != ECDevice.ECConnectState.CONNECT_SUCCESS && !SDKCoreHelper.isKickOff()) { ContactsCache.getInstance().load(); SDKCoreHelper.init(this); } // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); }
From source file:com.gochina.jclient.ui.LauncherActivity.java
private void showUpdaterTips(final boolean force) { if (showUpdaterTipsDialog != null) { return;/* w w w . ja va2 s . co m*/ } String negativeText = getString(force ? R.string.settings_logout : R.string.update_next); String msg = getString(R.string.new_update_version); showUpdaterTipsDialog = ECAlertDialog.buildAlert(this, msg, negativeText, getString(R.string.app_update), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); showUpdaterTipsDialog = null; if (force) { try { ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, true, true); } catch (InvalidClassException e) { e.printStackTrace(); } restartAPP(); } } }, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { CCPAppManager.startUpdater(LauncherActivity.this); // restartAPP(); showUpdaterTipsDialog = null; } }); showUpdaterTipsDialog.setTitle(R.string.app_tip); showUpdaterTipsDialog.setDismissFalse(); showUpdaterTipsDialog.setCanceledOnTouchOutside(false); showUpdaterTipsDialog.setCancelable(false); showUpdaterTipsDialog.show(); }
From source file:com.darly.im.ui.LauncherActivity.java
private void showUpdaterTips(String updateDesc, final boolean force) { if (showUpdaterTipsDialog != null) { return;/* www . jav a2 s .c o m*/ } String negativeText = getString(force ? R.string.settings_logout : R.string.update_next); String msg = getString(R.string.new_update_version); if (!TextUtils.isEmpty(updateDesc)) { msg = updateDesc; } showUpdaterTipsDialog = ECAlertDialog.buildAlert(this, msg, negativeText, getString(R.string.app_update), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); showUpdaterTipsDialog = null; if (force) { try { ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, true, true); } catch (InvalidClassException e) { e.printStackTrace(); } restartAPP(); } } }, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { CCPAppManager.startUpdater(LauncherActivity.this); // restartAPP(); showUpdaterTipsDialog = null; } }); showUpdaterTipsDialog.setTitle(R.string.app_tip); showUpdaterTipsDialog.setDismissFalse(); showUpdaterTipsDialog.setCanceledOnTouchOutside(false); showUpdaterTipsDialog.setCancelable(false); showUpdaterTipsDialog.show(); }
From source file:com.darly.im.ui.LauncherActivity.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(LauncherActivity.class), "onResume start"); super.onResume(); CrashHandler.getInstance().setContext(this); // // w ww. j a va2 s .co m MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECHandlerHelper.removeCallbacksRunnOnUI(initRunnable); ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ContactsCache.getInstance().stop(); CCPAppManager.setClientUser(null); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { // ? Intent intent = new Intent(this, LoginActivity.class); startActivity(intent); finish(); return; } // ?? registerReceiver( new String[] { IMChattingHelper.INTENT_ACTION_SYNC_MESSAGE, SDKCoreHelper.ACTION_SDK_CONNECT }); ClientUser user = new ClientUser("").from(account); CCPAppManager.setClientUser(user); if (!ContactSqlManager.hasContact(user.getUserId())) { ECContacts contacts = new ECContacts(); contacts.setClientUser(user, null, null); ContactSqlManager.insertContact(contacts); } if (SDKCoreHelper.getConnectState() != ECDevice.ECConnectState.CONNECT_SUCCESS && !SDKCoreHelper.isKickOff()) { ContactsCache.getInstance().load(); if (!TextUtils.isEmpty(getAutoRegistAccount())) { SDKCoreHelper.init(this); } } // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); }
From source file:com.yuntongxun.ecdemo.ui.LauncherActivity.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(LauncherActivity.class), "onResume start"); super.onResume(); CrashHandler.getInstance().setContext(this); // /* w w w .j a va2 s . co m*/ MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECHandlerHelper.removeCallbacksRunnOnUI(initRunnable); ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ContactsCache.getInstance().stop(); CCPAppManager.setClientUser(null); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { startActivity(new Intent(this, LoginActivity.class)); finish(); return; } // ?? registerReceiver( new String[] { IMChattingHelper.INTENT_ACTION_SYNC_MESSAGE, SDKCoreHelper.ACTION_SDK_CONNECT }); ClientUser user = new ClientUser("").from(account); CCPAppManager.setClientUser(user); if (!ContactSqlManager.hasContact(user.getUserId())) { ECContacts contacts = new ECContacts(); contacts.setClientUser(user); ContactSqlManager.insertContact(contacts); } if (SDKCoreHelper.getConnectState() != ECDevice.ECConnectState.CONNECT_SUCCESS && !SDKCoreHelper.isKickOff()) { ContactsCache.getInstance().load(); if (!TextUtils.isEmpty(getAutoRegistAccount())) { SDKCoreHelper.init(this); } } // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); }
From source file:com.yuntongxun.schoolgroup.ui.LauncherActivity.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(LauncherActivity.class), "onResume start"); super.onResume(); Intent intentGroup = new Intent(); intentGroup.setAction("com.yuntongxun.ecdemo.inited"); sendBroadcast(intentGroup);// w ww . ja va 2 s .c om CrashHandler.getInstance().setContext(this); // MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECHandlerHelper.removeCallbacksRunnOnUI(initRunnable); ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ContactsCache.getInstance().stop(); CCPAppManager.setClientUser(null); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { startActivity(new Intent(this, LoginActivity.class)); finish(); return; } // ?? registerReceiver( new String[] { IMChattingHelper.INTENT_ACTION_SYNC_MESSAGE, SDKCoreHelper.ACTION_SDK_CONNECT }); ClientUser user = new ClientUser("").from(account); CCPAppManager.setClientUser(user); if (!ContactSqlManager.hasContact(user.getUserId())) { ECContacts contacts = new ECContacts(); contacts.setClientUser(user); ContactSqlManager.insertContact(contacts); } if (SDKCoreHelper.getConnectState() != ECDevice.ECConnectState.CONNECT_SUCCESS && !SDKCoreHelper.isKickOff()) { ContactsCache.getInstance().load(); if (!TextUtils.isEmpty(getAutoRegistAccount())) { SDKCoreHelper.init(this); } } // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); getTopContacts(); }
From source file:com.kaichaohulian.baocms.ecdemo.ui.LauncherActivity.java
@Override protected void onResume() { LogUtil.i(LogUtil.getLogUtilsTag(LauncherActivity.class), "onResume start"); super.onResume(); Intent intentGroup = new Intent(); intentGroup.setAction("com.kaichaohulian.baocms.inited"); sendBroadcast(intentGroup);/*from w w w .j ava 2s .c o m*/ CrashHandler.getInstance().setContext(this); // // MobclickAgent.onResume(this); boolean fullExit = ECPreferences.getSharedPreferences() .getBoolean(ECPreferenceSettings.SETTINGS_FULLY_EXIT.getId(), false); if (fullExit) { try { ECHandlerHelper.removeCallbacksRunnOnUI(initRunnable); ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_FULLY_EXIT, false, true); ContactsCache.getInstance().stop(); CCPAppManager.setClientUser(null); ECDevice.unInitial(); finish(); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0); return; } catch (InvalidClassException e) { e.printStackTrace(); } } if (mLauncherUITabView == null) { String account = getAutoRegistAccount(); if (TextUtils.isEmpty(account)) { startActivity(new Intent(this, LoginActivity.class)); finish(); return; } // ?? registerReceiver( new String[] { IMChattingHelper.INTENT_ACTION_SYNC_MESSAGE, SDKCoreHelper.ACTION_SDK_CONNECT }); ClientUser user = new ClientUser("").from(account); CCPAppManager.setClientUser(user); if (!ContactSqlManager.hasContact(user.getUserId())) { ECContacts contacts = new ECContacts(); contacts.setClientUser(user); ContactSqlManager.insertContact(contacts); } if (SDKCoreHelper.getConnectState() != ECDevice.ECConnectState.CONNECT_SUCCESS && !SDKCoreHelper.isKickOff()) { ContactsCache.getInstance().load(); if (!TextUtils.isEmpty(getAutoRegistAccount())) { SDKCoreHelper.init(this); } } // ??Tab? if (!mInit) { initLauncherUIView(); } } OnUpdateMsgUnreadCounts(); getTopContacts(); }
From source file:com.speedtong.example.ui.chatting.ChattingActivity.java
/** * ???//from w w w . j a va 2s . c o m */ private void checkPreviewImage() { if (TextUtils.isEmpty(mFilePath)) { return; } boolean previewImage = ECPreferences.getSharedPreferences().getBoolean( ECPreferenceSettings.SETTINGS_PREVIEW_SELECTED.getId(), (Boolean) ECPreferenceSettings.SETTINGS_PREVIEW_SELECTED.getDefaultValue()); if (previewImage) { try { ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_PREVIEW_SELECTED, Boolean.FALSE, true); new ChattingAsyncTask(this).execute(mFilePath); mFilePath = null; } catch (InvalidClassException e) { e.printStackTrace(); } } }
From source file:com.speedtong.example.ui.chatting.ChattingActivity.java
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); LogUtil.d(TAG,/*from w w w .j a v a2s . c om*/ "onActivityResult: requestCode=" + requestCode + ", resultCode=" + resultCode + ", data=" + data); // If there's no data (because the user didn't select a picture and // just hit BACK, for example), there's nothing to do. if (requestCode == 0x2a) { if (data == null) { return; } } else if (resultCode != RESULT_OK) { LogUtil.d("onActivityResult: bail due to resultCode=" + resultCode); return; } if (data != null && 0x2a == requestCode) { handleAttachUrl(data.getStringExtra("choosed_file_path")); return; } if (requestCode == REQUEST_CODE_TAKE_PICTURE || requestCode == REQUEST_CODE_LOAD_IMAGE) { if (requestCode == REQUEST_CODE_LOAD_IMAGE) { mFilePath = DemoUtils.resolvePhotoFromIntent(ChattingActivity.this, data, FileAccessor.IMESSAGE_IMAGE); } File file = new File(mFilePath); if (file == null || !file.exists()) { return; } try { ECPreferences.savePreference(ECPreferenceSettings.SETTINGS_CROPIMAGE_OUTPUTPATH, file.getAbsolutePath(), true); Intent intent = new Intent(ChattingActivity.this, ImagePreviewActivity.class); startActivityForResult(intent, REQUEST_CODE_IMAGE_CROP); } catch (InvalidClassException e1) { e1.printStackTrace(); } return; } if (requestCode == REQUEST_VIEW_CARD) { finish(); return; } }