I would like to kill third party app(Google navigation) at my own discretion. Based on this in the docs, it sounds like I can use killProcess(int Pid) to kill the process with that id and any other process created by that same id. The kernel has restrictions on who can cancel a given process for security reasons. But I wasn't able to stop the navigation using that method. What am I missing? How can I accomplish what I am trying to do? I am using something to this effect to launch the navigation
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);