0

I'm working on marketing application, and I need to share promotional link through messenger apps. I've researched that it is possible to send message to WhatsApp, but I cannot find any tutorials of documentation of how to share/send message, for example, to Blackberry Messenger, LINE, etc.

Does anyone could share how to achieve this?

EDIT:

Just to let you know what I'm trying to achieve, this is a continuation of my research here. As I have found technical solution, now is the time for implementation, to share the link which I have generated with Google Analytics Campaign Measurement. I have found a way to share it to Social Media, like Facebook or Twitter, and now I want to know how to share to Messenger Apps.

Community
  • 1
  • 1
Harry
  • 568
  • 1
  • 5
  • 20
  • So you're going to spam your users' messaging accounts? – 323go Dec 11 '14 at 04:18
  • What do you mean spam? I've stated my purpose clearly on my question. And I've been doing a lot of research [here](http://stackoverflow.com/questions/27098548/android-detecting-various-cases-of-app-installation) and [here](http://stackoverflow.com/questions/27243146/android-using-google-analytics-v4-campaign-measurement) while working in this app. So, on what reason you think this is a prank? – Harry Dec 11 '14 at 04:26

1 Answers1

-1
Intent waIntent = new Intent(Intent.ACTION_SEND);
    waIntent.setType("text/plain");
    PostMessage = "your message to be shared";
    PostTitle = "your title to be shared";
    waIntent.setPackage("com.whatsapp");
    if (waIntent != null) {
        if (isPackageExisted("com.whatsapp")) {
            waIntent.putExtra(Intent.EXTRA_TEXT, PostMessage);
            waIntent.putExtra(Intent.EXTRA_TITLE, PostTitle);
            activity.startActivity(Intent.createChooser(waIntent,
                    "Share via..."));
        } else {
            Toast.makeText(activity, "Whatsapp is not installed",
                    Toast.LENGTH_SHORT).show();
        }
    }

above code is for Whatsapp. you can do it for other apps if you package names of those apps. but i have not tested it for doing so.

Amrut Bidri
  • 6,276
  • 6
  • 38
  • 80