我想自行决定杀死第三方应用(Google导航)。基于on this in the docs,听起来我可以使用killProcess(int Pid)来杀死具有该id的进程以及由该相同id创建的任何其他进程。出于安全原因,内核限制谁可以取消给定进程。但是我无法使用该方法停止导航。我错过了什么?我怎样才能完成我想做的事情? 我正在使用这种效果来启动导航
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + address));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK&Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
activity.startActivity(intent);