原生平台中,如何跳转链接

在 浏览器中可以使用 window.location.href = url 或 window.open(url) 的跳转一个链接,但是打成安卓apk包的时候,以上这两种方法都不可以,请问下,在原生平台要用什么方法才能跳转一个隐私协议的链接

public static void openUrl(String Url) {

    try {

        Uri uri = Uri.parse(Url);

        Intent intent = new Intent(Intent.ACTION_VIEW, uri);

        _instance.startActivity(intent);

    } catch (

            Exception e) {

        Log.d("test", "test: 进入6");

    }

}

这个是要在 安卓端接入是吗 ,
谢谢大佬,

写java原生方法,jsb去调用就行

明白了,谢谢

cc.sys.openURL(“https://forum.cocos.org”);

public static void openURL(final String url){
    CustomTabsIntent intent = new CustomTabsIntent.Builder()
            .build();

    intent.launchUrl(App,Uri.parse(url));
}

写在安卓那边然后ts调用就可以,App传AppActivity就行

感谢感谢, :grinning: