I'm developing a small messaging app on my own and I was wondering if there is a possibility to allow the user to send messages using the Google Assistant. (Like WhatsApp and Google Allo)
Which API could I use to archive this?
I'm developing a small messaging app on my own and I was wondering if there is a possibility to allow the user to send messages using the Google Assistant. (Like WhatsApp and Google Allo)
Which API could I use to archive this?
I saw something in the WhatsApp manifest :
Apparently they are using this action : com.google.android.voicesearch.SEND_MESSAGE_TO_CONTACTS
No trace of that in any docs... Coincidence, I think not...
https://github.com/GigaDroid/Decompiled-Whatsapp/blob/master/AndroidManifest.xml
Before going through the code please go through this links answer along with comments .
So as mentioned there are two types of actions that can be registered 1) Custom Action 2) System Action Here app has been registered with
TAKE A NOTE
action(a system generated action). This is registered in the Manifest to let the system know that it accepts the intents which are related to taking a note.(Hope i have not over explained it)=== Code ===
Manifest.xml
MainActivity.java
This how i tested it
Ok Google -> take a note -> google asks me choose an app -> choose the app to be tested -> give a note or a text to it -> see your log (text you said is printed there).
I will edit the answer to meet your need exactly in some time . Hope this helps