I want to build an apk(Named commander) to use Google assistant(SDK), the feature designed below:
1:control some device, for example. Just say"Ok google, set the brightness to 100" or "Ok google, take a picture now."
2:Use default google assistant's feature, for example. "Ok google, call lucy" or "Ok google, send a message to Lucy to ask her to have breakfast"
3:Send command directly without say "Ok google, let's talk to commander"
My question is that, is Actions on Google just build an app which is plugged in google assistant app? Could user call my own app to do something when receive the actions on google.
For example:
User say "ok google, call lucy" this command will deliver to google own assistant to handle it, and when user say "ok google, set the brightness to 100" will response an action to my owner app with parameter(100) in a intent?
Could I implement it ?
As a commenter stated, you can modify the Android Things sample for the Google Assistant SDK so that it runs on phones.
The sample does not include hotword capability. You'll launch the regular Google Assistant and not your implementation. If you want your implementation to handle particular commands, you should add device actions.
If you register commands like "Call $name" or "Set the brightness to $percent", you can handle that with your own implementation like your own VoIP service or change the brightness.
Related
I want to initiate a video call on my app using google assistance like below
OK Google, call ABC using MyApp
where ABC is a contact inside my app (not in device) and MyApp is the name of my app.
Good morning, Vinil! Invocation directly after "OK Google" or "Hey Google" is reserved for Google employees building Google-branded actions, so I doubt you'll be able to build this functionality.
You can, however, build an app that responds to something like, "Hey Google, talk to Super Awesome Phone App," where Super Awesome Phone App is the name of your app. Thereafter, you'll be able to handle a user's request to "call ABC."
If you want to build a telephony application for Google Assistant, you can refer to this sample and this codelab sequence.
The requirement is to launch my Android app if the user commands GA to find nearby restaurants of McDonald' where McDonald is the app name. Since the user is not mentioning that s/he wants to search in McDonald app it is not an explicit intent which the app can handle with a defined intent filter. I want to understand which component should I use to get this done.
There will be another use case that user wants to order some food item that has the name, McDonald. This suggests that ideally, I have to define action sets(set of templates) although the app doesn't converse with the user hence DialogFlow is not usable.
I contacted the Google action team after going through this Question, their response was that Invoking an Android application from an AOG app is not an available feature at this moment, this could be achieved using Google Assistant
What is the option left for this use-case?
My findings
Open app with Explicit intent
Perhaps the same use-case
Voice action
You will want to sign up for the app actions developer preview, which will expose intents in your app to be opened from the Assistant.
At Google I/O 2019, some updates were posted about App Actions. However, the current developer launch does not include the ability to implicitly call through to an app. The user will need to explicitly call out the app to use.
Official documentation
Google I/O 2019 session on App Actions (video)
Sample application on github
I am working on a project to integrate the Google Assistant with an existing Android app. The requirements are simple. Assuming my app is named TestApp and I want it to just change the background color of the app home page, I want to be able to say,
"Hey Google, Change background to black on TestApp".
I was given links to ActionsSDK, but looking into it, I see that it is only a stand-alone app that extends Google Assistant and has nothing to do with android itself.
The closest API I found that does what I need is the Voice Interactions. This is very similar to what I need done but it only allows preset voice triggers such as "call this person..." or "set alarm at...", but cannot do "change background..." like in in my example. According to this link, custom voice actions aren't allowed.
So my question is, is it possible to directly interact with my app and have it do a very simple task?
Thanks
You may want to connect an Android app property with your Actions project to sell your digital goods in the Play store. Implement digital transactions to sell your Play store items as part of a conversation with your Action.
To connect an Android app with your Actions console project, you will first need to connect a website to your project. Follow the instructions provided above in Connecting a website.
Once you've connected a website, under Android app, click the Connect App button and follow the instructions shown. Once you have completed the instructions over in the Play console, it may take up to 24hrs before the connected Android app is reflected in the Actions console.
Try this in Action on google
Right now there is no way to do communication between Android App and Google Assistant. If your GA is built upon Dialogflow API (specifically not using action-on-google), then you can use Dialogflow Android client in your Android App to communicate with Dialogflow Agent.
I wrote an app for my own use to brighten the screen when I was in bright sunshine and could not see the screen by asking the assistant to launch the app. Then on launch I executed code to make the change. A cheesy work-around I know :-)
you can try using this
[1]: https://docs.slanglabs.in/slang/
This will allow you to perform several actions through voice inside your app. You can use the console to add actions and utterances and there are some sample apps which might help you.
I have used it in a lot of my apps.
Feel free to reach out in case you need help, good luck!
I've seen the Voice Actions API and it describes how you can create your own voice interactions that can be started by Google Assistant using keywords. This enables the user to say Ok, Google and then your keywords. Google Assistant then forwards the interaction to your android app's activity.
I'd like to go the other direction. I want to use a built-in interaction that Google Assistant already handles, but I'd like to begin the interaction from inside my app (meaning I want to pass some data to Google Assistant, or at least launch it with it listening). Does anyone know if that is possible? Each time my app detects a certain trigger, I'd like to prompt Google Assistant to begin a specific interaction with the user without them first having to say "Ok, Google".
I could do something similar by beginning my own interaction using text to speech and the speech recognizer service, but the voice sounds and work flow are so much cleaner in Google Assistant so why re-invent the wheel.
Alternatively, if there was a way to use the same voice and voice recognition used by Google Assistant I could work with that.
Any ideas?
Since you asked your question, Google has launched a developer preview of the Google Assistant SDK that sounds like it does what you want (or can). Although intended for embedded devices, it will let your users open a voice channel to the Assistant without having to say "OK Google" and get a voice response back.
There are some issues still with triggering something inside your app itself, but it is possible now and expected to improve over time. Currently you'd have to issue the command to your app out of channel - so either by having your server-side Action send your app a GCM message or by taking other actions that your app could pick up.
It's possible with Google Now (with voice command) to open app with parameters?
Example:
I have an app that can controls an alarm, named "Alarmed"
Can I say:
"OK google , 'command' app" -> Then open app and pass data 'command' to the app "app".
Thanks!
Nope! Thats not available to all developers quite yet.
Google decides what goes in for some reason.
As you can see here from google.
And more recently.