1

This article tells me it can be done while this says it's not possible at all. Am I reading the links wrongly? What is the most effective way to have a share button on a webapp built by WebView?

Community
  • 1
  • 1
user2335065
  • 2,337
  • 3
  • 31
  • 54

1 Answers1

2

You can share using android default share bottom sheet. use the following component.

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));
}

This provides native sharing experience on Android devices while using web. Native android share

shivendra pratap singh
  • 1,318
  • 1
  • 13
  • 18