Reputation: 13699
Quick question that I can't seem to find an answer for.
If I am in the Android web browser... is it possible to fire a "Share" intent with JavaScript? Just trying to streamline the "Share to..." process.
It might not be possible but I would just like to confirm it before I announce that to my team.
Added info:
I do not have any Android application running. Only an HTML file and a JS file.
Upvotes: 3
Views: 2540
Reputation: 42849
It most certainly is possible. Take a look at the WebView.addJavascriptInterface()
method, as it should be able to provide you exactly what you need.
The basics of using addJavascriptInterface()
are detailed here.
Service
or Activity
).WebView
(This would be the addJavascriptInterface()
call).Upvotes: 1
Reputation: 7315
If you redirect the user to a link that your application Activity intent filters are cibling, yes, it is possible.
Upvotes: 0