13
votes

I see there are many threads on

How to send whatsApp message without opening WhatsApp?

All the answers lead to either of these two options:

  1. Open whatsApp -> select contact. Message set in intent would be sent to that contact.
  2. Open whatsApp with specific contact -> paste manually the message set in intent and hit send.

So, there is no option provided by WhatsApp to directly send a message to contact completely in background.

If this is so, then how GoogleNow is able get hold of this unavailable service of whatsApp?

If it is a new service opened up in google or whatsApp, can I get pointers so I could use this in my app?

1
Are you talking about the new Direct Share feature that was introduced in Android M?Eduard B.
Right. This is the one I was looking for. Is this in Lolipop?naamadheya
No. As I said above, it's a new feature only in Android Marshmallow.Eduard B.
Ok, But then it iterates back to my question. How "Google Now" is able to send message to WhatsApp contact in Lolipop?naamadheya
@Edy : I donot want to use GoogleNow in my app. I want to create the Intent like Google Now does to send WhatsApp message without opening WhatsApp.naamadheya

1 Answers

3
votes

WhatsApp doesn't have any information about it, and doesn't have any API.

Refer to these discussions:

WhatsApp's philosophy is to push storage down to devices, rather than doing central server based message storage. This means the API needs to live on the device as well.

Because "WhatsApp does not want to inundate users with messages they don't want to see", per Brian Acton in the latest F8 conference. While that may be sad for developers, I think it's a good decision. WhatsApp's appeal is private, human, group conversations. It does that extremely well and for more than a billion people. Disturbing that would be risky.

Several companies around the world could benefit on developing customer service apps through WhatsApp.

And in the official page of WhatsApp there's only these information about integration (which is actually an Android System function).

I think what GoogleNow really does is handle the events of the system, Google has Android so there is no problem for them to know all the events and actions that can be integrated into the system when having an app installed.

So, is not possible for us (unfortunately) do that yet. We'll have to wait to WhatsApp to elaborate some API.