有什么方法可以在web端唤起鸿蒙应用。

鸿蒙
2021-09-27 16:41:00
浏览
1
收藏 2
回答 2
待解决
回答 2
按赞同
/
按时间
Der_带鱼
5

1.java组件有WebView 提供在应用中集成Web页面的能力

网址;https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ui-java-component-webview-0000001092715158

2.java关于web的相关API,包名:ohos.agp.components.webengine.,此包还提供回调以获取网页信息并控制网页重定向。有关详细信息,请参阅WebAgent和BrowserAgent。软件包中的WebConfig用于提供与网页相关的设置选项。

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/browseragent-0000001120951629

举例:

(1)WebView:此类继承自组件,包含基本组件的所有功能。此组件可用于加载网页内容、获取页面详细信息和控制页面跳转。您还可以使用数据功能加载本地网页文件。

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/webview-0000001078480106

(2)WebAgent:处理WebView组件的事件和通知。

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/webagent-0000001078160526

(3)WebConfig:管理WebView对象的配置状态。

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/webconfig-0000001138633149

3.js组件有web ,展示网页内容的组能力

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-components-web-0000001135254399

4.js中使用WebSocket建立服务器与客户端的双向连接

网址:https://developer.harmonyos.com/cn/docs/documentation/doc-references/js-apis-net-websocket-0000001123029768

 

分享
微博
QQ
微信
回复
2021-09-28 10:51:59
没用的喵叔
3

试一下安卓支持的deeplink方案,鸿蒙应该也支持

分享
微博
QQ
微信
回复
2021-09-27 21:29:13
相关问题
computeScroll() 方法鸿蒙什么可以替代
3849浏览 • 1回复 待解决
鸿蒙系统怎么唤起微信
7915浏览 • 1回复 待解决
IOT医疗领域哪些应用
2204浏览 • 1回复 待解决
32位电脑鸿蒙系统组件吗?
6197浏览 • 3回复 待解决
华为JS API如何唤起分享?
2841浏览 • 1回复 待解决