Skip to main content

How to cross post your Instagram stories to WhatsApp?

There are two ways to integrate with WhatsApp:

-Through a custom URL scheme
-Through Android's intent system

Custom URL Scheme:

WhatsApp provides a custom URL scheme to interact with WhatsApp:

If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.

Here is an example of how to write this on your website:

Hello, world!

Android intent system:

Like most social apps on Android, WhatsApp listens to intents to share media and text. Simply create an intent to share text, for example, and WhatsApp will be displayed by the system picker:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");

startActivity(sendIntent);

However, if you prefer to share directly to WhatsApp and bypass the system picker, you can do so by using setPackage in your intent:

sendIntent.setPackage("com.whatsapp");

This would simply be set right before you call startActivity(sendIntent);

Similarly you can use Android's intent system to send media through WhatsApp, once again, using setPackage to restrict the package to WhatsApp if you only want to send to WhatsApp.

To know more about Andoird Intent, check this page out.

Comments

Popular posts from this blog

Best Gaming Laptops You Can Buy Right Now

Gaming Laptops are no joke. They pack some serious performance under the hood that even some mid-range desktops cannot match. They’re often considered as huge, heavy and fat machines with red and blue paint all over their chassis, but that’s not the case at present. Over the past few years, manufacturers have introduced laptops packing more and more power in a thinner and lighter chassis. If you take a look at a gaming laptop from ten years ago and compare to anything from the present, I can guarantee that your jaw will drop and you’ll start wondering how technology has improved over the decade. Here are the top 10 performance grade laptops to make your selection from. 1. ASUS ROG G701VI Gaming Laptop  Unlocked Intel i7-7820HK processor 64GB of DDR4 RAM (yes, you read that right!) 1 TB NVMe SSD Overclockable GTX 1080 desktop class graphics card 17.3-inch 120Hz Full HD IPS panel with NVIDIA G-Sync 2. Alienware 17 R4 Intel i7-7820HK processor (overclocked up to 4.4 GHz) 32GB of DDR4 ...

Now you can whisper to Alexa

Amazon’s Alexa can now listen and respond to whispers, and she will whisper back. Now first, this might set off another wave of anxiety for privacy advocates. Your virtual assistant is not only spying on you and potentially recording or storing your conversations, now she can do even if you tried to keep your voice down. Amazon’s team just made that sensitive microphone function even more acutely. Video demonstrating Alexa whisper: So, why do we need to whisper in the first place? Will it come handy in anyway? Yes. If you whisper, “Echo, play a lullaby,” for the infant who’s almost asleep in your arms, Echo will whisper back, “Here’s a station for lullabies from your Amazon Music library,” instead of screaming at  full startling volume. What's more? Whisper is not the only important feature that will come to Amazon Echo devices this year, we also have bunch of new ones. Guard : Guard will let you say, “Alexa, I’m leaving,” and the device will automatically acti...

How to verify your downloaded files using MD5 Checksum on Windows?

MD5 stands for Message Digest version 5 . The MD5 algorithm takes a file (the “message”) of any size, and reduces it down to a code that looks like this: “ac30ce5b07b0018d65203fbc680968f5″ (the “digest”). The brilliant thing about the MD5 algorithm is that if the message changes by so much as a single byte, it will produce a completely different digest. An MD5 sum is a string of letters and numbers that acts like a fingerprint for a file. If two files have the same MD5 sum, the files are exactly alike - which is why MD5 "fingerprints" can verify whether or not your downloaded file got corrupted in transit, hence it is used to verify the integrity of files, as virtually any change to a file will cause its MD5 hash to change. MD5 digests have been widely used in the software world to provide some assurance that a transferred file has arrived intact. For example, file servers often provide a pre-computed MD5 (known as md5sum) checksum for the files, so that a user can compare th...