Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【提案】DwebBrowser集成到系统分享中 #204

Open
kingsword09 opened this issue Jul 29, 2024 · 1 comment
Open

【提案】DwebBrowser集成到系统分享中 #204

kingsword09 opened this issue Jul 29, 2024 · 1 comment

Comments

@kingsword09
Copy link
Contributor

kingsword09 commented Jul 29, 2024

1. 为什么需要这个接口?

  • 将应用集成到系统分享接口中,可以更好的与系统进行交互,提升应用的更多可用性;
  • 智能镜头:在移动端可以使用分享来将二维码分享给智能镜头来进行扫码;
  • 后续 传送门 之类的提案如果完成,类似多人线上白板之类的功能,可以将图片直接分享到上面;
  • dweb应用之间可以互相分享。

2.如何接入到系统中

img_v3_02d8_c1646f1e-a0cd-47c9-a8f7-6fba00dd64bg

  • DnsNMM需要新增用于查找可接受分享类型的接口
fun queryShareAccept(accept: Any) {} // 暂时还没想好怎么查找

3.dweb应用如何接入

  • 应用需要在Manifest字段中新增ShareAccept mimeTypes
{
   "share_accept": ["MimeTypes: 声明可以接收的分享类型,可以参考web的"]
}
  • 应用需要编写类似PWA应用接受其它应用分享数据的接口,PWA接收文档;

4.plaoc的share插件也需要接入这个功能,来分享应用内的资源给其它应用(朝着DwebOS更近一步了🤣)

  • 直接调用系统的分享走完整系统分享?
  • 使用dweb deeplink调用,提供一个内部弹窗,先优先弹出内部应用的分享界面,而后用户也可选择展开为系统分享界面?
@kingsword09
Copy link
Contributor Author

kingsword09 commented Sep 12, 2024

https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target
需要先实现这个share_target到manifest中,每个NMM模块定义自己可以接收的分享target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant