摘要:
Android 开发有时需要在一个应用中启动另一个应用,比如Launcher加载所有的已安装的程序的列表,当点击图标时可以启动另一个应用。一般我们知道了另一个应用的包名和MainActivity的名字之后便可以直接通过如下代码来启动:1Intent intent =newIntent(Intent.ACTION_MAIN);2intent.addCategory(Intent.CATEGORY_LAUNCHER);3ComponentName cn =newComponentName(packageName, className);4intent.setComponent(cn);5start 阅读全文