How to answer a user in Home device and send a notification to user's phone - dialogflow-es

Is there any way to answer a user question in the Home device and at the same time, send a notification to another device?
For example, if the user ask for a direction, answer with the location (voice) and finish saying to the user:"I've sent you the location to your phone" and send him a map...
I know there is a way to switch conversation to another device (say, for example, one with screen) but I don't want to finish it in Home device.
Thanks in advance.

Not in a straightforward way, no, but there are a few options that you have that may do what you want.
You can try to use Assistant Notifications. Right now, notifications only appear on mobile devices, but even if/when they allow speaker notifications in the future, your user could still open it on a mobile device. You need to ask for permission to send a notification, and when they trigger the notification, an Intent in your Action will be triggered to actually show what you want to show.
You can also look into using a more standard notification channel such as Firebase Cloud Messaging. This does require you to have your own app on the mobile device, and it works outside of the Assistant, but may be a good choice if it meets your needs.

Related

Smart home google action not responding and device is always offline

I created a smart home action using action-on-google and nodeJs, and it works fine. When you say turn on switch off, it sends MQTT request to my server, means that onExecute function works fine but the problem is that google doesn't respond to my command by OK it says "sorry it looks like your device not available right now", I observed also that my device is always offline in Google home app. Is it required to work with firebase and get device state from there?
Firebase is one of web services allowed to store a device's states. You can feel free to use other web services.
If your device is offline, it may be because your Google Home App hasn't received your device's states.
Here are two paths for Google Home App receiving your device's data:
Google Server will send a action.devices.QUERY intent and callback your function (e.g. onQuery) to get the data of your device through your fulfillment, see action.devices.QUERY.
Thus, please print logs in the onQuery function and make sure that your function works fine.
Your smart home action must use the API of reportStateAndNotification to update your device's data in the Home Graph, see Method: devices.reportStateAndNotification.
If Google Assistant gives you "Sorry, device is not available right now", it probably is because the Google server hasn't received correct information from your fulfillment. Please follow the suggestions above and try it again.
If you're still having issues, check your logs to identify the particular issue for that device.

Google Assistant Personal Actions

I have created an action inside google, connected it to dialogflow, connected in byt fulfillment to my own home network.
Now I would like to be able to use this on my phone, raspberry, etc. But I don`t want to deploy this to the whole world (because then they can turn off my lights).
How should I do this?
You can release your action to an Alpha channel, which let's you control who can access your action, which is just yourself by default. But you can also add up to twenty accounts.
https://developers.google.com/actions/deploy/release-environments

How to close mic in google assistant app

I had submitted my app for review, but Google replied with "mic" issue. Google Replied :
During our testing, we found that your app would sometimes leave the mic open for the user without any prompt. Make sure that your app always says something before leaving the mic open for the user, so that the user knows what they can say. This is particularly important when your app is first triggered.
Some Points:
1. app.ask()---leaves the mic opens.
2. app.tell()---app leaves the conversation.
I have also enabled the "toggle" of "Set this intent as end of conversation".
Any suggestions??
My app is one to one i.e. If user ask "my address" then address is shown, If "show me direction to PLACE_NAME" then directions are shown. BUT after it mic opens. How to close it?
-----UPDATED-------
fuction someName(app)
{
//---code-----
app.ask('Alright, your address is '+ user_address);
}
I don't want to use app.tell() as it closes the app.
Some other suggestion for this one to one Q/A conversation.
If you are doing fulfillment through a webhook, then the "end conversation" toggle is ignored in favor of what you are sending from your webhook.
You don't show any code, but as noted:
If you use app.ask() or one of the variants of it, the message will be sent to the user and the microphone will be left open. In this case, you should make sure it is clear what you're expecting from the user - in other words, ask a question or prompt them.
If you use app.tell(), the message will be sent to the user and the microphone will be closed. This will end this conversation.
It sounds like, in your case, you should be using app.tell().

Send SMS from an app with no UI

Does anyone know how to send an SMS from the xcode application without using the UI?
I mean I want the SMS to be sent internally from the application. I have seen an app that has this feature.
I have alarm system, the alarm only receive SMS nothing else, I need the user to see the alarm name that is easy, but I want the user to choose the alarm name and control it (close, open) and I need to send command by SMS that the issue, the user should not see the alarm number neither the content which is the command text if you can help me that I will pay anyone that can help me with this.
I'm developing on iOS version 4.2.
no there is no way to do it in background , you have to call the GUI unless you create your api that ask for no & send sms from server.

How to trigger an application in mobile automatically

My idea is to make an application start automatically when a message from a specific user reaches the inbox of the mobile . For example if my friend sends some numbers to my mobile, the sms has to be read and validated first and then calculator ( inbuilt mobile application) has to be triggered and process the numbers from the message. Please help me with the above query.
I am far from convinced you will be able to give the phone user access to the same sms you use to launch your MIDlet.
You may need to use native development on the phones that support it if J2ME can't give you exactly what you need.
In any case, you probably want to try with J2ME first so you need to read the specifications for JSR-118 and its PushRegistry API, along with JSR-120, which interfaces with SMS.
Most current J2ME-enabled phones will support static SMS Push but you will need to send the SMS to a particular port, much like you would data over a standard library socket.
I don't think you can trigger on just any old SMS message arriving.
This is the class you want to look at, in any case:
javax.microedition.io.PushRegistry

Resources