鸿蒙怎么打开网页,Android可以正常打开

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.baidu.com/"));
this.startActivity(intent);  鸿蒙是怎么样的

鸿蒙 网页
2021-04-27 19:27:56
浏览
收藏 0
回答 3
待解决
回答 3
按赞同
/
按时间
黑板报呀
1

开发者你好,可以通过这种方式实现。

 

try {
    Intent intent = new Intent();
    Operation operationCommonComponts = new Intent.OperationBuilder()
            .withUri(Uri.parse(website)) // website是网站
            .build();
    intent.setOperation(operationCommonComponts);
    startAbility(intent);
} catch (Exception exception) {
    error("Unable to open website", exception, this);
}

已于2021-5-21 08:51:40修改
分享
微博
QQ
微信
回复
2021-05-21 08:50:49
51CTO_newuser88

这是回答页面吗? 

我的手机上不能完整浏览。

分享
微博
QQ
微信
回复
2021-04-28 04:44:28
mb6099f6fe0824b

有结果了吗

分享
微博
QQ
微信
回复
2021-05-20 15:47:19
相关问题
鸿蒙开发怎么打开快应用?
3092浏览 • 2回复 待解决
鸿蒙系统怎么打开定位开关页面
8332浏览 • 1回复 待解决
怎么跳转打开其他app
6401浏览 • 1回复 待解决
鸿蒙-如何打开跳转WLAN设置页面
8023浏览 • 1回复 待解决
鸿蒙-如何打开跳转GPS设置页面
15291浏览 • 1回复 待解决
打开应用时打开同一进程
780浏览 • 1回复 待解决
工具类里 怎么跳转或打开页面呢?
1906浏览 • 1回复 待解决
webview打开地址时报错 怎么回事啊?
3604浏览 • 1回复 待解决
图库支持打开哪些格式啊?
629浏览 • 1回复 待解决
【ets】switch开关打开后会自动关闭
1669浏览 • 1回复 待解决