本文整理匯總了Java中com.umeng.analytics.MobclickAgent.onKillProcess方法的典型用法代碼示例。如果您正苦於以下問題:Java MobclickAgent.onKillProcess方法的具體用法?Java MobclickAgent.onKillProcess怎麽用?Java MobclickAgent.onKillProcess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.umeng.analytics.MobclickAgent
的用法示例。
在下文中一共展示了MobclickAgent.onKillProcess方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: quit
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
public void quit() {
MobclickAgent.onKillProcess(this);
MyApp myApp = ((MyApp)getApplication());
L.i("isAntiTheftServiceStarted:" + myApp.isAntiTheftServiceStarted);
L.i("isBgdService2Started:" + myApp.isBgdService2Started);
if (myApp.isAntiTheftServiceStarted || myApp.isBgdService2Started){
MainActivity.this.finish();
}else{
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
System.exit(0);
}
//確認是否在退出後取消接收聊天信息
SettingSPUtil setSP = MyApp.getInstance().getSettingSPUtil();
if (!setSP.isChatReceiveMsgAlways()){
PushManager.stopWork(getApplicationContext());
}
}
示例2: exit
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
public void exit() {
try {
finishAllActivity();
// 友盟統計,統計關閉
MobclickAgent.onKillProcess(mApplication);
// 殺死該應用進程
android.os.Process.killProcess(android.os.Process.myPid());
} catch (Exception e) {
Logger.e(e);
}
}
示例3: onBackPressed
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
/**
* 雙擊返回鍵退出
*/
@Override
public void onBackPressed() {
long mNowTime = System.currentTimeMillis();//獲取第一次按鍵時間
if ((mNowTime - mPressedTime) > 2000) { // 比較兩次按鍵時間差(2秒 之內雙擊就退出應用)
Toast.makeText(this, "再按一次退出" + getStrings(R.string.app_name), Toast.LENGTH_SHORT).show();
mPressedTime = mNowTime;
} else { //退出程序
finish();
MobclickAgent.onKillProcess(this);
System.exit(0);
}
}
示例4: uncaughtException
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
@Override
public void uncaughtException(Thread t, Throwable e) {
e.printStackTrace();
// 友盟保存統計信息
MobclickAgent.onKillProcess(mContext);
showCrashTips();
startJettyServer(mContext);
// 退出並重啟應用
exitAndRestart();
}
示例5: uncaughtException
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
public void uncaughtException(Thread thread, Throwable ex) {
try {
LogInfo.log("king", "uncaughtException");
throw new Exception(ex);
} catch (Exception e) {
e.printStackTrace();
if (handleException(ex) || this.mDefaultHandler == null) {
try {
Thread.sleep(3000);
} catch (InterruptedException e2) {
LogInfo.log(TAG, "Error : " + e2);
}
PreferencesManager.getInstance().setCrashCount(PreferencesManager.getInstance().getCrashCount() + 1);
if (PreferencesManager.getInstance().getDownloadFlag() != 1) {
((NotificationManager) LetvApplication.getInstance().getSystemService("notification")).cancel(1000);
}
DownloadManager.pauseAllDownload();
LetvCacheMannager.getInstance().destroy();
if (LetvConfig.isUmeng()) {
MobclickAgent.onKillProcess(LetvApplication.getInstance());
}
Process.killProcess(Process.myPid());
System.exit(1);
return;
}
this.mDefaultHandler.uncaughtException(thread, ex);
PreferencesManager.getInstance().setCrashCount(PreferencesManager.getInstance().getCrashCount() + 1);
}
}
示例6: onKillProcess
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
public static void onKillProcess(Context arg0)
{
if (!DEBUG)
{
MobclickAgent.onKillProcess(arg0);
}
}
示例7: onBackPressed
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
/**
* Loading界麵-返回鍵就是退出應用
*/
@Override
public void onBackPressed() {
MobclickAgent.onKillProcess(this);
System.exit(0);
}
示例8: onKillProcess
import com.umeng.analytics.MobclickAgent; //導入方法依賴的package包/類
public static void onKillProcess(){
MobclickAgent.onKillProcess(context);
}