---
title: "Android kill the process"
author: "sunzeping"
date: "2014-02-13T10:35:57Z"
tags: []
categories: ["移动开发"]
slug: "android-kill-the-process"
draft: false
lastmod: "2014-02-13T10:35:56Z"
id: 1856685
url: "https://sunzeping.iteye.com/blog/1856685"
---

Intent intent = new Intent(MainActivity.this, LoginActivity.class);

                    intent.addCategory(Intent.CATEGORY\_HOME);

                    intent.setFlags(Intent.FLAG\_ACTIVITY\_CLEAR\_TOP);

                    startActivity(intent);

                    android.os.Process.killProcess(Process.myPid());