app打开另一个app
- try {
- PackageManager packageManager = getPackageManager();
- Intent intent=new Intent();
- intent = packageManager.getLaunchIntentForPackage("com.tencent.mm");
- startActivity(intent);
- } catch (Exception e) {
- e.printStackTrace();
- Intent viewIntent = new
- Intent("android.intent.action.VIEW",Uri.parse("http://weixin.qq.com/"));
- startActivity(viewIntent);
- }
如果安装了微信则直接打开,否则启动游览器去官网下载