Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Android share intent in Javascript in Chrome?

I would like to bring up the Android Share menu from Javascript in Chrome for Android. I know that you can launch a specific app from Chrome: https://developers.google.com/chrome/mobile/docs/intents

Is there a way to use href="intent://..." to open the Share menu? This is how it is done in an app: http://developer.android.com/training/sharing/shareaction.html

like image 787
Piwakawaka Avatar asked Oct 09 '13 23:10

Piwakawaka


2 Answers

There is navigator.share as an experimental technology mentioned in MDN.

Also described more in Google Developers page.

From chrome 61 you can do this, here is demo I found online. I've tested it on latest Android Chrome (on Android Oreo) and it works fine.

like image 138
Developia Avatar answered Sep 28 '22 03:09

Developia


The quick answer is you can't.

I made this sample: http://jsbin.com/AdAPEmu/2 which constructs the Intent as it would appear for Android and Chrome doesn't recognise it, it needs a package to go with it.

like image 20
Kinlan Avatar answered Sep 28 '22 05:09

Kinlan