Sharing link on WhatsApp from mobile website (not application) for Android
Just saw it on a website and seems to work on latest Android with latest chrome and whatsapp now too! Give the link a new shot!
<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>
Rechecked it today (17th April 2015):
Works for me on iOS 8 (iPhone 6, latest versions) Android 5 (Nexus 5, latest versions).
It also works on Windows Phone.
Whatsapp share link not working from mobile
I tried the same link in different android browser(FireFox) and it was working fine.
For chrome i changed the link to this -> whatsapp://send?text=
My code:
string WhatsappShareURL = "whatsapp://send?text=" + Request.Url.AbsoluteUri;
hlWhatsappMobile.NavigateUrl = Server.UrlEncode(WhatsappShareURL);
For Computers:
I use this link -> https://wa.me/?text=
My code:
string WhatsappShareURL = "https://wa.me/?text=" + Request.Url.AbsoluteUri;
hlWhatsappWeb.NavigateUrl = Server.UrlEncode(WhatsappShareURL);
Then i toggle them in jquery:
$(document).ready(function () {
if ($(window).width() < 520) {
//Show mobile link
}
else {
//Show Web link
}
});
How to use mobile app into whatsapp share link working?
The below code directly shares the Text to the Whatsapp app using Intent.
Intent textIntent = new Intent(Intent.ACTION_SEND);
textIntent.setType("text/plain");
textIntent.setPackage("com.whatsapp");
textIntent.putExtra(Intent.EXTRA_TEXT, "Your text here");
startActivity(textIntent);
Whatsapp linking
Please try this for mobile
So for a danish number +45 1234 5678 it would be
4512345678
Change 45 to your contry code
<a id="app" target="_blank" href="whatsapp://send?phone=4512345678"> </a>
OR
<a id="app" target="_blank" href="https://api.whatsapp.com/send?phone=4512345678"> </a>
This will only work for mobile, not for desktop. You shuld make a modal so when its clicked they can choose to open mobile or desktop version of the link.
Related Topics
Android No on Screen Keybord ( Only Voice )
Limitations on Opening Pdf File in Android
Changing Background Color of the Layout on a Button Click in Android
How to Get Device Id in Flutter of Both Android and Ios
Textview With Too Long Strings
How to Disable Recyclerview Items from Clicking
How to Disable Spinner in Android and Enable It on Button Click
How to Connect Existing Android Studio Project to Existing Github Repository
How to Get Root Access on Android Emulator
Android Studio - How to Find Valid Certification Path to Requested Target
Retrofit 2.0 - How to Get Response Body for 400 Bad Request Error
Android: How to Scale a Bitmap to Fit the Screen Size Using Canvas/Draw Bitmap
How to Edit Files Inside the Android Adb Shell
Change App Language Programmatically in Android
Missing Android Platform(S) Detected