【发布时间】:2015-06-01 14:50:35
【问题描述】:
This article 告诉我可以做到,而this 说根本不可能。 我是否错误地阅读了链接?在 WebView 构建的 web 应用上设置分享按钮最有效的方法是什么?
【问题讨论】:
标签: javascript android mobile webview share
This article 告诉我可以做到,而this 说根本不可能。 我是否错误地阅读了链接?在 WebView 构建的 web 应用上设置分享按钮最有效的方法是什么?
【问题讨论】:
标签: javascript android mobile webview share
您可以使用 android 默认共享底页进行共享。 使用以下组件。
if (navigator.share) {
navigator.share({
title: 'Web Fundamentals',
text: 'Check out Web Fundamentals — it rocks!',
url: 'https://developers.google.com/web',
})
.then(() => console.log('Successful share'))
.catch((error) => console.log('Error sharing', error));
}
【讨论】: