Reputation: 35194
I'm using Chrome to trigger intents by clicking on links in the browser:
<a href="intent://scan/#Intent;scheme=zxing;package=
com.google.zxing.client.android;end"> Take a QR code </a>
Works great with the barcode scanner. But is there any way to share an image in the same way for the WhatsApp application?
My guess it that it would look something like this (obviously missing the image here):
intent://send/#Intent;scheme=whatsapp;package=com.whatsapp;
action=android.intent.action.SEND;end
But this only opens up the Google Play store and shows me WhatsApp.
Any ideas?
Upvotes: 5
Views: 3022
Reputation: 543
you only need to use this.
<a href="whatsapp://send?text=<<HERE GOES THE URL ENCODED TEXT YOU WANT TO SHARE>>" data-action="share/whatsapp/share">Share via Whatsapp</a>
Upvotes: 2