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就可以启动。
解决方案 »
- 无法安装ADT Cannot complete the install because of a conflicting dependency
- System.Out.Print()显示超长文本,后面的看不到,怎么办?
- 对QA无语了
- eclipse 运行 android 的问题
- 谁有android2.3的networkLocation,发一下吧,谢谢啦。
- 我的AndroidTest模拟的界面跟介绍的为什么不一样?
- 打开 “图库”的时候调用我自己的activity提示输入密码
- Android使用了哪几个类实现把资源XML文件当中的资源标识符转换成相类型应识符资源对象的?
- android 的三个小问题
- 关于getDisplayMessageBody的问题
- Android shell中有没有类似bashrc/profile这样的自动运行的脚本
- 中科创达这公司如何
提前写一个广播接收器,然后用户点了之后发送广播信息就好了。。
总之想要启动的话,获取其activity加入到Intent中就好了。
正解,可以搜搜通过这样获取到安装的所有app,然后装到viewpage中点击启动对应的程序的例子
就类似 windows里面 开始——运行——c:/1.doc——确定 然后系统就自动找到doc的打开方式处理