Launch app with parameters with Google Now - android

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.

Related

Ingration mobile app with Google Assistant

do you guys know if I could make an Ok Google mobile app that reacts for that popular phrase, then send it to Dialogflow or some Google- or self-like platform that processes voice input and then get extracted params and commands included in voice command into the app?
I tried with shortcuts.xml file but it works only in App Actions Test Tool in Android studio. When I tried it with Google Assistant logged in on the same Google account it didn't work. Same after uploading app into Google play (still the same account) as internal tests. Google Assistant didn't recognize my custom intents as all.
I also tried the Google Actions Console project and Dialogflow project but when in first case I can upload it so it is available only for me in the second case I can't access it anywhere.
I try to make Smart Home app so it must handle intents like "Switch light on/off in the kitchen" and similar to it. I must connect Google Assistant voice control with my home app. I already have Java mobile app and C# desktop app (this one controls physical devices).
If you could propose some solutions to that problem I really will be grateful.

Google Assistant Actions

I am trying to use the Google Assistant to launch an activity of my Android app with a specific parameter.
I have read this:
https://codelabs.developers.google.com/codelabs/actions-1/#0
https://developers.google.com/assistant/app/action-schema
https://developers.google.com/assistant/app/get-started
But I am confused, completely lost.
From my point of view, everything looks messy and confused.
In the Actions Console I have created one Action Project called "Actions Project for my app".
Then I went to the DialogFlow console and modified the Default Welcome Intent and created some other intent. Both were tested using the testing option "See how it works in Google Assistant."
It worked well doing those testings.
Then, in another site I read that I have to create an Action.xml file in my app project in Android studio. But how do I have to do that? Do I have to "export" my project "Actions Project for my app" to some xml file? I think that documentation is not enough for clumsy people like me. I don't really know the next step. I am really struggling with this.
Basically I want the assistant to let the user say something, then pass that information to my app, do somework and then execute an activity to do something.
For example, if we are talking about MyCookingApp I want this:
User: Ok Google, talk to MyCookingApp
Assistant: Welcome to MyCookingApp, what do you want to cook?
User: Pizza
Assistant should open my app with the parameter "Pizza". My app should display an activity with a pizza image and the recepie for it.
Is all this possible?
Connecting your serverside Action to your Android app is not directly feasible. Actions on Google is available on a variety of surfaces beyond Android, so you can't necessarily expect the Action to immediately launch your app. However, there are a few ways to get the behavior that you want:
Make your response include a BasicCard which has a link to deep link into your app
Look at using App Actions to achieve the behavior you want, which is designed for the Assistant to link into Android apps
From your Action's webhook, send a push notification to the user's phone (assuming you have account linking setup) to your app to open it up

Initiate app's video call using Google Assistance

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.

How do I use Google assistant to trigger my application

I am trying to build a simple app which can be triggered by google assistant.
Like if the users say, "Hey Google, Open TestApp" or "Hey Google, perform xyz from TestApp".
What would be the best approach? Dialogflow?
Saying "Okay, Google - do [something] with [your app]" in order to open your app to fulfill a query is called a Google Voice Action and you can add these to your app quite easily. See the documentation here for full details. Keep in mind - for these to work, your app does need to be in the Play Store, uploaded as a beta at the very least.
The Google Assistant is a little bit different - it's more conversational and doesn't take the user directly to your app. Instead, it takes the user's input, looks for the appropriate app to handle the query, feeds the query to your app, and then returns the response, within Google Assistant itself. This is all about having a conversation with an app, from the Google Assistant, without actually opening up your app.

Use Google Assistant to directly talk to my Android app and execute a very simple task

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!

Categories

Resources