方式一:

       Intent intent = new Intent();
        // 获得应用管理器
        PackageManager pm = getPackageManager();
        intent.setAction("www.baidu.com.cn");
        Uri data = Uri.parse("http://www.baidu.com:8080/android");
        intent.setDataAndType(data, "p_w_picpath/ng");
        // 用这个意图去遍历所有的activity
        List dataList = pm.queryIntentActivities(intent, 0);
        if (dataList.size() > 0)
        {   
            startActivity(intent);
        }
        else
        {   
            Toast.makeText(this, "没找到", Toast.LENGTH_SHORT).show();
        }

方式二:

   当然啦.try catch也可以规避  推荐使用第一种

        try
        {
            Intent intent = new Intent();
            intent.setAction("www.baidu.com.cn");
            Uri data = Uri.parse("http://www.baidu.com:8080/android");
            intent.setDataAndType(data, "p_w_picpath/ng");
            startActivity(intent);
        }
        catch (Exception e)
        {   
            Toast.makeText(this, "跳转出错", Toast.LENGTH_SHORT).show();
        }