扫描的二位吗如何判断是网址还是别的内容,如果是网址如何实现跳转而不是显示网址

解决方案 »

  1.   

    网址那你的看是不是包含 www.  或者http:// 之类的标志
    如果是网址,你通过intent跳转
     Uri uri = Uri.parse("你的网址");
     Intent intent = new Intent(Intent.ACTION_VIEW, uri);
     startActivity(intent);
      

  2.   

    在你的网址前加上http://
    或者https://
    亲试有效
      

  3.   

    生成二维码的时候带上http://或者是https://类型
      

  4.   

    简单又暴力
                    if (st.startsWith("http")) {
                        //网址,楼上有跳转方法
                    } else {
                        //文本
                    }