try {
Intent intent = new Intent(Intent.ACTION_MAIN);
ComponentName componentName = new ComponentName(
"com.tencent.mobileqq",
"com.tencent.mobileqq.activity.SplashActivity");
intent.setComponent(componentName);
context.startActivity(intent);
} catch (Exception e) {
UIToast.showToastLong("手机未安装QQ");
}启动QQ ,,其它应用程序 获得指定的MainActivity就可以启动。
Intent intent = new Intent(Intent.ACTION_MAIN);
ComponentName componentName = new ComponentName(
"com.tencent.mobileqq",
"com.tencent.mobileqq.activity.SplashActivity");
intent.setComponent(componentName);
context.startActivity(intent);
} catch (Exception e) {
UIToast.showToastLong("手机未安装QQ");
}启动QQ ,,其它应用程序 获得指定的MainActivity就可以启动。
提前写一个广播接收器,然后用户点了之后发送广播信息就好了。。
总之想要启动的话,获取其activity加入到Intent中就好了。
正解,可以搜搜通过这样获取到安装的所有app,然后装到viewpage中点击启动对应的程序的例子
就类似 windows里面 开始——运行——c:/1.doc——确定 然后系统就自动找到doc的打开方式处理