Intent intent;
        intent = new Intent(Intent.ACTION_VIEW);
        intent.setDataAndType(file, "application/pdf");
        try {
            startActivity(intent);
        } catch (ActivityNotFoundException e) {
            // No application to view, ask to download one
            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            builder.setTitle("No Application Found");
            builder.setMessage("Download one from Android Market?");
            builder.setPositiveButton("Yes, Please",
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Intent etIntent = new Intent(Intent.ACTION_VIEW);
                            etIntent
                                    .setData(Uri
                                            .parse("et://details?id=com.adobe.reader"));
                            startActivity(etIntent);
                        }
                    });
            builder.setNegativeButton("No, Thanks", null);
            builder.create().show();
        }
    }

解决方案 »

  1.   

    感谢 CSDN_Ask 的共享奉献精神,从CSDN问答网站  开站以来,从未间断分享的坚持,对于一些正在努力学习的筒子们  有很大帮助的。
      

  2.   

    s[align=left]etDataAndType(file, "applicatio try {[align=left]     startActivity(incatch (ActivityNotFoundException e) {// No application to view, ask ertDialog.Buiwww.syszhj.comlder builder = new AlertDialog.Buildbuilder.setTitle("No Application Fbuilder.setMessage("Download one from Android Market?");builder.setPositiveButton("Yes, Pl        new DialogInterface.OnClickListene
      

  3.   

    问题是这一步可通不过。
    请管理员和产品考虑下这样的流程:
    1. 4月25号注册了一个帐号A:csdn_test,并发了一些贴子
    2. 4月26号用自己的weibo帐号B:weibo_test登录,并发了一个一些帖子
    3. 4月27号,用户想把A,B帐号打通。问题来了。1.登录B:weibo_test 想绑定A
    选择绑定帐号,sorry,只有解除绑定的选项! 
    选择解除绑定,sorry,还得绑定邮箱!
    设置老邮箱,oh,soory!设置新邮箱,oh,sorry!(其实我早就绑定过邮箱了)
    2.登录A:csdn_test 想绑定B
    点击绑定:oh,no!又返回帐号B了!