android中一个APP 如何控制另一个App启动和退出,求代码?

# 在一个App中控制第三方App的启动和退出,在这个App退出后第三方App可以在后台运行

可以通过Intent 中的action 属性
Intent intent= new Intent();
intent.setAction(Intent.ACTION_MAIN);
startActivity(intent);
你想要跳转到哪个app只要知道注册时的action就可以.
也可以通过包名进行跳转.具体看api中的intent
如果都不知道只能通过广播了

启动的话使用intent就可以了。退出还真没考虑过,估计要用到进程杀死吧