Use various Firebase services setup, run and extend the functionality to your Actions on Google Assistant app.
Fulfillment defines your app's functionality and conversational elements. If your app interacts with external APIs, requires complex logic, or needs to read and store to a database, it will need fulfillment. With Firebase Functions, your app's fulfillment is hosted as an HTTP web service, making deployment and maintenance quick and easy.
While you can use any HTTP web service for fulfillment on Actions on Google, Firebase Functions is one of the easiest ways to define fulfillment for your Assistant app:
- Deploy your endpoint rapidly and seamlessly, with minimal time spent configuring CLI settings or importing additional libraries
- Effortlessly integrate with other Firebase cloud services such as Firebase Real Time Database
- Computing resources are automatically scaled according to your app's usage, so you don't need to worry about server maintenance at all
- Setup fulfillment without providing a credit card or billing information
To get started with Cloud Functions for Firebase, visit the docs for Firebase Functions. Also see the Actions on Google docs for Deploying to Cloud Functions.
Many Assistant apps use rich media content in their conversations, to improve the user experience. And if they don’t, they should! Apps that use images and sound clips rather than just text typically end up being much more vibrant and memorable, and as a result see higher engagement and retention among users.
Firebase Hosting makes it extremely simple to host static rich media files for use in your Assistant app. You can upload files in the Actions on Google folder we create for you in the Firebase console, and then immediately start referencing those files in your Assistant’s rich responses.
If you are an existing Firebase user, you can also easily re-use any assets you have hosted for your mobile or web apps.
If your Assistant app generates user-specific files, Firebase Storage will give you a place to store it. Whether it’s a log of your app’s responses in a text file or an image file, allow your users to access content you create for them, wherever they are.
This also means your user’s data can persist across multiple platforms. For instance, your web app generates an image for a user. By using storage, that image is accessible to that same user, through your Assistant app. When using your mobile app, if connectivity is spotty, the download of the user’s files will pause and then resume when their signal improves.
To learn more, visit our Firebase Storage docs.
Firebase Realtime DB
Your Assistant app may require a backend to store simple data. Firebase Realtime Database is a cloud-hosted solution that stores data as one large JSON tree. Low latency means Realtime Database is ideal for synched states across clients.
Plus, if you’re an existing Firebase developer, you can re-use your existing database to share a backend between your mobile and Assistant apps. This means your mobile app can be notified of changes a user makes through your Assistant app. Ultimate synchronicity!