Sharing link on WhatsApp from mobile website not application for Android

0 votes
I created a website that is primarily used on mobile devices.
I want to make it possible for users to send data directly from a website into WhatsApp.

I can differentiate between iOS and Android using UserAgent detection.
I was able to learn that I could use the following URL to implement the aforementioned in iOS:

href="whatsapp://send?text=http://www.example.com"
Since the aforementioned does not function when the operating system is Android, I am still hunting for a solution.
I suppose that has something to do with leveraging Android's "intent" feature, but I'm not sure how to use it as a href parameter.
Nov 3, 2022 in Android by Edureka
• 12,880 points
119 views

1 answer to this question.

0 votes
<html>   
<head>   
    <title> Add a WhatsApp sharing link on a website </title>   
</head>   
<style>  
     //css code to hide the WhatsApp sharing link on the large screen  
    @media screen and (min-width: 1000px) {  
        a {  
            display: none  
        }  
    }  
</style>  
  1.   
<body>   
    <h3 style="color:brown"> WhatsApp sharing Link </h3>   
    <!-- create a link using anchor tab -->  
    <a href="whatsapp://send?text=This is WhatsApp sharing example using link"       data-action="share/whatsapp/share"  
        target="_blank"> Share to WhatsApp </a>   
</body>   
</html> 

Instead of using a desktop or laptop, test the code above on a mobile device. You will receive the reply detailed below. Click the Share to WhatsApp link here to be taken to your mobile device's WhatsApp messenger.

answered Nov 7, 2022 by Edureka
• 11,450 points

Related Questions In Android

0 votes
1 answer
0 votes
0 answers
0 votes
0 answers

Termux code to install git on termux in Android mobile

$ pkg install github Says: Reading state information... Done E: ...READ MORE

Nov 8, 2022 in Android by Edureka
• 12,880 points
679 views
0 votes
1 answer

Why YouTube Player API does not work on Android 11?

The Android 11 package visibility limitations prevent ...READ MORE

answered Nov 15, 2022 in Android by Edureka
• 12,880 points
285 views
0 votes
1 answer

Sharing link on WhatsApp from mobile website and not application for Android

 the link is correct according to new ...READ MORE

answered Jun 1, 2022 in Others by nisha
• 2,190 points
616 views
0 votes
1 answer

How to take a screenshot of a current Activity and then share it?

For me, I captured and then shared ...READ MORE

answered Feb 8, 2022 in Others by Soham
• 9,700 points
102 views
0 votes
1 answer

Provide an image for WhatsApp link sharing

the problem is with the size of ...READ MORE

answered Feb 28, 2022 in Others by narikkadan
• 53,520 points
5,003 views
0 votes
1 answer

Tableau dashboard for mobile/tablets

To make a dashboard mobile with Tableau, ...READ MORE

answered Apr 5, 2022 in Tableau by Neha
• 8,940 points
169 views
0 votes
1 answer

How to open the Google Play Store directly from my Android application?

If you want to link to your ...READ MORE

answered Nov 7, 2022 in Android by Edureka
• 11,450 points
224 views
0 votes
1 answer

How to turn on front flash light programmatically in Android?

For this problem you should: Check whether the ...READ MORE

answered Nov 8, 2022 in Android by Edureka
• 11,450 points
216 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP