How do I read QR Code using Google Actions - actions-on-google

I am building Google Actions using Actions SDK, I would like action to read values from QR code. The solution shouldn't require to install any other additional app. Using the existing Google Assistant the value in QR code should be read and sent as Intents.

Google Actions do not support any interactions with QR codes during the conversation. If you wish to create a QR code that links into your action you can use action links. With action links you can generate a URL that directs the user to your action in the Google Assistant app.
You could create a QR code that has this action link as it's content and when a user scans this action link with a scanner app they can browse to the URL, which will start your action.

Related

Can Google Assistant access audio on a web post

I want to allow my friend using Google Home to access audio posts on a WordPress blog. Can I make it treat my blog as a podcast without registering it with, say, iTunes?
I don't have a Google Home unit, and have not found detailed documentation on Google Assistant, except for writing actions. Is there a simpler way to do what I want without writing an action? Can I get my audio file and then access the existing code that handles operations within a file such as seeking, play, pause, etc. from my action?
You can take a look at content actions to generate a unique feed for your audio posts. In this way, you would be able to effectively create a podcast which can be surfaced by users on Google Homes as well in the Google Podcasts app. This would be a shallow integration.
If you want something more advanced and customized, you can create an Action and make use of the Media Response in Actions on Google.
Even if you don't have a Google Home, you are able to access your Action from other surfaces like a smartphone. You can also make use of the simulator in the Actions on Google console for development.

DialogFlow: Google Calendar Event function from Google Actions (Oauth2)?

I have created an agent in DialogFlow that interacts with the user giving her the ability to check for details like demographic from a back-end database. I have achieved this using Fulfillment/Webhook calls and have successfully parsed/returned different types of Responses to the user to play with. I have tested this on both an Android device and the Google Actions Simulator.
Now, what I want to achieve is to give user the ability to "Set a Reminder" on a platform like Google Calendar or similar through my App. By default, Google Assistant does this by simply telling it to "remind me..." and Google creates a reminder in the calendar. But as soon as I invoke my app, the Assistant is out of scope so using the "remind me" command won't work. I want to use the Google Calendar for example to create a reminder through my agent so that the user is notified at the due time.
I understand that when the user invokes an App in Google Assistant, she is using her Google credentials so I guess if I want to use the App to create a reminder, I should have the option. I have had a look at the Calendar API but I am not sure if I should proceed that way. Is there a better way of achieving this?
Please note, I want to use a reminder service that is available to the user without subscribing to a third-party service.
The Calendar API is the way to go. Details here.
In those docs you'll see reference to the access token, which you can get by using the helper intent askForSignIn (example of use here in one of Google's example projects).
Hope this helps!
So for all those who are facing the same issue, here is what I did:
First created an account on https://auth0.com
Followed this guide to configure the necessary settings to link to Google Assistant (ignored the Jovo part)
Used Auth0 guide to configure and link to my Google project credentials (ignored the Admins SDK Service part)
Now when I run my Google Actions App on the device, a button "Link [App Name] to Google" showed up. Clicking on that "signed me in".
Parsed the response in my webhook to grab originalRequest.data.user.accessToken
This is the token mentioned in #lukedavis answer. The next step was to use the token to execute a call to the Calendar API. Upon trying that, I am facing a different problem which I am trying to find the solution for. But the above should assist those who wish get the accessToken.

Google assistant notification

Refer me to some ready made example of google assistant notification, I'm a tech guy I have already developed app with dialogflow(donot support notification yet), I have both google home and mobile assistant, just want to see google action notification in action.
There's this very detailed guide by Google with ready made code that you can easily adapt to your needs.
It offers code for Dialogflow as well as for the plain ActionsSDK.
Basically the steps are:
Ask for permission
React to it in your fulfillment code (confirming the user's decision)
Notifying Google's backend when it should send a notification to the user (you need a JSON web token). This last step has to be done on some backend which knows about when to send notifications
Those steps are outlined in more detail on the linked site and there's also described how to obtain the token.

What is the simplest way to create a custom google assistant action that returns a piece of date from a web page

I want to develop a custom google assistant action that will get a web page, extract a piece of information, and read it aloud.
I'm looking for pointers for relevant sources.
If it's possible through services such as ifttt it's even better (though from what I saw the google assistant support in ifttt doesn't appear to support this scenario).
You're looking to create an Action with the Actions-on-Google API. The easiest way would probably be to create a Firebase Function with node.js that handles the AoG request from Google, makes the call to the web page, extracts the information you need in a form that can be read aloud, and sends that back.

How to implement my android algorithm on iOS?

I have an android app working this way:
User read QR-code with my specific URL
If the app installed it intercepts this URL and handles it somehow.
If app not installed standard browser opens this URL and it leads to Google play on app page.
When user install and run app first time it read browser's history and look for my URL.
If app found URL in browser's history then it handles this URL again.
Is it possible to implement this behavior on iPhone/iPad?
I suppose key features here are to read browser history and to intercept http URL's.
If this is impossible how would you implement this thing on iOS?
Thanks in advance for your help.
You can use custom application URLs in the form: myApp://... iOS will automatically launch the application if present. The logic for handling the 'not-installed' case has to be in the QR code scanning app. can be handled by the scanned website via a forwarding link using the iOS custom URL scheme (this might be useful for usage stats).
Additional info on implementing Custom URLs...