本文整理汇总了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);
}