admin管理员组

文章数量:1645532

以下是我整理浏览器系列APP软件,一些自己在实践实际运用中整理到的Scheme协议地址,分享大家使用,如果没有可以评论@我,我在寻找可以补充协议地址。

包含了 UC浏览器、百度浏览器、Chrome谷歌浏览器、QQ浏览器、猎豹浏览器

//UC浏览器 
ucbrowser://

//QQ浏览器 
mttbrowser://

//Chrome谷歌浏览器 
googlechrome://

//QQ浏览器:
qq browser://

//猎豹浏览器:
sinaweibosso.422729959://

//百度 
baiduboxapp:// 或 BaiduSSO://

  

封装好的谷歌浏览器打开网址的函数

function openUrlWithChromeOrDefaultBrowser(url) {
    // 尝试使用谷歌浏览器打开URL
    try {
        var intent = new android.content.Intent();
        intent.setAction(android.content.Intent.ACTION_VIEW);
        intent.setData(android.Uri.parse("googlechrome://navigate?url=" + url));
        intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
        app.startActivity(intent);
        console.log("尝试使用谷歌浏览器打开URL");
    } catch (e) {
        // 如果谷歌浏览器未安装,使用系统默认浏览器打开URL
        console.log("谷歌浏览器未安装,尝试使用默认浏览器");
        intent = new android.content.Intent();
        intent.setAction(android.content.Intent.ACTION_VIEW);
        intent.setData(android.Uri.parse(url));
        intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
        app.startActivity(intent);
    }
}

// 示例用法,传入要打开的网址
openUrlWithChromeOrDefaultBrowser("https://www.Google");

本文标签: 最全浏览器地址系列更新中