Just wondering if there is way to integrate Dialogflow responses with an Android app and control the app’s UI in response to the conversation.
Say the user is trying to do something in an mobile app and asks for help. So the app rather than talking the user through would actually demonstrate how to do it by controlling the app UI.
Could custom payload response be an option? Have not really tried Dialogflow yet just exploring at the moment. Would be good to hear from someone who tried something similar.
Through conversations in google assistant I want to open my android app on my phone.
For example: I'm conversing with my chatbot and as a response to my query the bot should open my android app.
My requirement is to open the app automatically (user is not required to click on the deep link response to open the app)
I have looked at the documentation and references of Action Builder and Actions SDK. But couldn't find any proper solution on how to do it.
I have already looked at the response of another similar question. However, that solution suggests user has to manually click on the deep-link in the conversation response to open the app which doesn't suit my needs. I want the app to be automatically opened without user intervention
Can anyone provide a code snippet (for webhook) or steps on how to do it?
Appreciate the help
As the other response noted, there are no automatic ways to open an app in this way. What you may be able to do potentially is have your webhook send a push notification to your mobile app, which will then automatically open the app.
I am learning about google actions and made a basic, google-keep like app which records notes for logged in users. it has a mobie client and a firebase server. i wish to know if assistant could be made to interact in such a manner that notes could be created via an assistant session without opening the mobile client at all.
For example:
User (on any screen): "hey google"
AI - "hi , how can i help?"
U - " place a note to call david in customNotter" ( suppose)
Ai - "am sorrry, customnotter does not exist on your mobile , download it from playstore http"//www.link..."
U - *downloads customNotter app , installs, logs himself in*
U - " place a note to call david in customNotter"
Ai - "Ok, your note is saved"
*saves note "call david" in customNotter (by somehow calling some code to interact with customNotter's server?)*
I can imagine a kotlin code that could be included in my app , which the assistant could trigger which could simply add the note to server, but cannot imagine how assistant could trigger that code with user's auth details and the note data?
PS: Also i wish to know if google home could also be integrated for such app. And if not , what are the key factors that would limit google home to not interact with my server ? like suppose am building a complete business model for CustomNotter , where there is a unified server and many clients like ios / android / web apps . can google home be able to act like another authenticated client, interacting directly with the server?
The best option is to use Actions on Google to directly make calls to your Firebase server and update the database that way. The hooks into Android apps are not deep at the moment. Android Actions were announced, but are not available right now.
The benefit of doing this is that your Action will work on any Assistant surface, beyond an Android phone, and will not require the user to install your app.
Since you can run Actions on Google on Firebase Functions, it is easy to incorporate into your Firebase database.
You're making a couple of assumptions here, but before I make different assumptions, I want to clarify something. You said "it has a mobile client and a firebase server". I assume the "firebase server" is what stores the user's notes?
If so, then you don't really need to have the app installed locally at all for the Assistant to work with it. You just need to make sure your mobile app and your Action both have the same user account reference, so they can update and read from the same records in the database. This would work anywhere the Assistant can run Actions - on a mobile device or on a speaker such as Google Home.
In this case, your conversation might look like this:
User: Hey Google, ask Custom Notter to remind me to call David.
Assistant: Getting Custom Notter
[Earcon, indicating your Action is running]
Action: Hi there. I've added a note to call David.
[Earcon, indicating the Action is done]
This is a very simple example of the conversation. Other conversation flows may also want to indicate if the user hasn't connected such an app to the account, or you may need to prompt them for permission to use their account, etc.
You will need to write server code to handle the processing - all Actions interact with a webhook running on a server in the cloud. You can write this in any language you wish, including Kotlin, and on any service you wish - however Google provides libraries and other support if you run it in node.js using Firebase Cloud Functions or on Google's Cloud.
All the details are available at https://developers.google.com/actions/
If you do have a mobile app, and you want to look into how to get the Assistant to launch things in that app, you can look into App Actions, which are coming soon for Android.
I do not know whether this is an appropriate question for this site or not. However, searching the Internet has not lead me to anything. I have searched some other questions on this site related to Inter App Communication and they are not really quite what I wanted.
I am creating 2 apps. Let's call them App A and App B. They would be used to keep track of visitors to a particular community. Now, whenever a visitor enters the apartment details of the Unit that he wants to visit in App A, a notification should be sent to the current resident of the Unit (he will be logged into the app). I will be achieving this using Firebase Cloud Functions/Messaging. Now, when the resident of the unit approves the notification, App A should be communicated the approval/rejection.
I am having trouble with the latter part. How do I communicate a value between 2 apps?
Also, I am open to suggestions on other ways to approach this problem.
EDIT: Also, I forgot to mention that these apps will be running on different devices.
To make things clear, I would like to put forward the way I am thinking of approaching it. The Visitor enters his details in App A. They go into a Firebase Realtime Database. This would trigger a Cloud Function. This Cloud Function would send a notification to the logged-in user on App B. The user of App B would then approve or reject the Visitor. I need a way to communicate this decision to the other app.
EDIT 2: After doing a bit more research on this topic, I discovered the Pub/Sub model. Would that model work for the task that I have described?
I have made a chat application of my own. But in my chat application I have to login and logout again and again. I want to make it as What's App or any other chatting app ( i.e the user should login only once and rest all the time when there is internet connection available he/should getconnected to the application automatically and vice versa.
I have got no idea how to manage the same. I have searched it thoroughly, have found a clue regarding Application Class. But not enough so that I can use it in my application.
Please help me with a hyperlink regarding my requirement or guide me with a set of code so that I can start with.
Thanks
You do not need a Service class for single-sign-in! Use the SharedPreferences class.
You can persist the current user's password on the client device and use this to authenticate against the server every time the user opens the app.
Tech Lead on the Android Developer Relations team specifically recommends SharedPreferences: What is the most appropriate way to store user settings in Android application
If you want to receive messages in the background while your app isn't in the foreground, then you probably want to use Service class. You will probably want to use Google Cloud Messaging as well, which Google developed to help you with push notifications.