[MUSIC PLAYING]
JESSICA DENE EARLEY-CHA: Welcome to "Assistant on Air,"
where we have conversations about building
for Google Assistant.
I'm Jessica.
And I'll be your host today.
I'm a Developer Relations Engineer for Google Assistant.
This episode is a little different from our typical,
two people sitting on the couch and chatting.
We'll be hearing from Madhukar and myself
about how to integrate your car app with App Actions.
Now over to Madhukar.
MADHUKAR SRIVASTAVA: Welcome to Assistant and Android
for Cars session.
Hi I'm Madhukar Srivastava.
And I'm a Product Manager on the Google Assistant team.
With me today is Jessica, who is a Developer Relations Engineer.
Thanks for joining us in the session where
you learn how Google Assistant works with Android for cars.
Despite changes in driving behaviors in the last two
years, our users still spend a lot of time in their car
with over 1 billion cars on the road.
Google Assistant wants to be present and be helpful
where our users are.
In 2018, Google Assistant was integrated
into Android Auto allowing users to use their voice in their car
to get things done.
Since then, user adoption of voice assistants in car
has steadily increased over the last few years,
according to a recent consumer adoption report.
Also noted in that report is that users are evaluating voice
support when purchasing cars.
35% of Google Assistant users cite the feature
as a car purchase requirement or a significant consideration.
With the flexibility of Android and thanks
to developers like you, we've been
able to bring the helpfulness of Google Assistant,
tailored for every drive regardless of the type of car.
Whether a user has an older car, is
looking to stay connected in their current car,
or is in the market for a new car,
we have three main product experiences
to help users on their drive.
First is Assistant Driving Mode, which lives on the phone screen
and allows drivers to get things done
on the phone with the voice without leaving Google Maps.
Second is Android Auto which allows you to connect
your phone to the car display.
The third product experience is Android Automotive OS
with Google built in, where Android runs directly
on the car, powering the infotainment system
and giving drivers access to their favorite apps
directly on the car display, without the need for a phone.
We'll focus on the latter two experiences in today's session
and demonstrate how Google Assistant enhances
the Android for Cars experience with voicified apps.
We're you're very excited about voicifying apps for Android
for Cars, as it allows users to access
your app's content in a safe and optimized manner while driving.
Voice is a natural fit in the car
as it helps users get things done in a simple, seamless,
and hands-free way so they can have their hands on the wheel
and focus on the road, while accessing
your apps through voice and making their journeys
delightful and productive.
App Actions is the easiest way to integrate your Android
apps with Google Assistant, letting
your app join in fulfilling millions of Assistant user
queries.
It lets your users jump right to the most interesting and useful
points in your app with simple voice commands.
Assistant does this by understanding
what capabilities apps support and which apps can best
fulfill user's request.
Today, we'll start off with an overview
of building for Android for Cars and of App Actions.
Then we'll do a deep dive on how Google Assistant's App
Actions can enable voice control for Android Auto apps.
Let's do a quick overview of building Android for Cars.
We recognize that it's not easy to develop apps for cars, given
the various screen form factors and input methods,
on top of the overarching focus on driver safety.
There's really a lot to consider.
And our developer tools address these challenges.
Our goal is to simplify the process
of developing apps for cars.
That's why we introduced the Car App Library.
This allows you to write your code once and make
your apps available across both Android Auto and Android
Automotive OS.
The user interface is designed with driver safety
in mind, which, in turn, helps you build apps that are safer,
without needing to become an expert on driver safety.
And why this is an important form of input in cars?
So apps built with the Car App Library
enable you to have seamless integrations
with voice assistants.
Unlike phones and tablets where you get flexible control
over an app using the touchscreen, in cars,
we are providing you with predefined templates
that were carefully built with driver safety considerations.
Our approach is to expose relevant templates to you
according to your app's category and, over time,
build a cohesive library that allows
for even more customization.
We have started that journey for the Car App Library
with navigation, parking, and charging apps.
Let's walk through the architecture for a car app.
When your app is launched in the car,
a host application running on either Android Auto
or Automotive OS will connect to a CarAppService
that you will extend.
In your CarAppService, you will override onCreateSession,
which returns a session instance corresponding
to the current connection to the host.
The session is responsible for returning the screen instance
to use the first time the app has started
by overriding onCreateScreen.
Then each of your screen classes will implement onGetTemplate,
which returns a template object, representing
the state of the UI to display in the car's screen.
The template will be fed back to the host application, which
will render the UI for you.
With Android Auto, you'll find the same look
and feel across all cars running Android Auto.
With Android Automotive OS, it's a bit different.
You'll find the rendered UI influenced
by car manufacturers' customizations.
So your app will feel like it belongs in that specific car,
without any extra effort on your part.
We're also expanding the charging and parking category
to include more point-of-interest apps
to help users find locations of places they want to go.
The Car App Library allows you to write your code once
and make your app available across both Android Auto
and Android Automotive OS.
Let's go over to Jessica to learn how Android apps can use
Assistant via App Actions and how they integrate with the Car
App Library.
JESSICA DENE EARLEY-CHA: Thanks, Madhukar.
Hi I'm Jessica.
Let's do a quick overview of App Actions.
App Actions is how developers integrate Google Assistant
with their Android apps.
With App Actions, users can jump into the most
interesting and useful points in your app
with simple voice commands.
Let's think about this in two main steps required for users
to access your app's features through voice commands
to Assistant.
First, you need to process the user-spoken input
and understand their request.
Second, we need to fulfill the user's requests.
To understand a user's request, Assistant has identified
and supports over 60 intents, which we call Built-In
Intents, or BIIs for short.
These BIIs are also arranged by several categories.
Assistant does what is called in the natural language world
"intent matching" between the user's speech to the BII.
Intent matching loosely means identifying several speech
patterns for particular functionality or intention
of the speaker.
Let's walk through the user's experience
and see who does what.
So we have the user, Assistant, and your app.
When the user says, hey, Google, find
charging near SFO on ExampleApp, Google Assistant
will process the user's input using Natural Language
Understanding, or NLU for short.
Assistant will intent match and pull
parameters supported by that intent.
BIIs understand that there are different kinds of charging
stations that someone could ask for, like address
or name of a location.
This information is added as a field of the BII
so the app can provide exactly what the user wants.
Here, the GET_CHARGING_STATION BIIs match.
And the location, SFO, is pulled from the user's input
and set to the corresponding coordinates.
The app is triggered with this data
and opens the app to a map or a list
of charging station options.
Since Assistant takes care of all the NLU, all you need to do
is select which BIIs your app will support
and how you want to fulfill these user requests.
You can use Android intents or deep links
to launch your app as fulfillment.
Here, let's take a look at how App Actions
work across Android for Cars.
On auto surfaces, App Actions integration
works both for Android Auto and Android Automotive OS.
The Auto app needs to be built with the Car App Library
from Android for cars.
At this time, App Actions on Auto
supports BIIs that are relevant to on-the-go use cases,
parking and charging.
On screen are a couple BIIs with matching example queries.
Let's take a look at how those BIIs work
with a partner, ChargePoint.
ChargePoint allows users to find charging stations on the go.
They also have two demos for the two different user experiences.
Starting with the Android Auto user experience
where the user says, hey, Google,
find charging stations near 1600 Amphitheater
Parkway with ChargePoint.
The app launches with a map and a list of charging stations.
Moving to the Android Automotive OS,
users get a very similar experience
but with the flavor of the car manufacturer customizations.
This example is a user saying, hey, Google,
find charging stations in Mountain View with ChargePoint.
By using car App Library and App Actions,
you build your app once.
And it provides a great user experience
on both Android Auto and Android Automotive OS.
Let's walk through how to integrate
App Actions into a car app.
Here's an example where we need to first declare support of App
Actions in the main activity.
You could do so by adding shortcuts metadata
in your Android manifest file.
Then we will need to declare that our car app supports
deep links.
You could do so by creating an intent filter for deep links
in the Car App activity.
Then we need to specify the built-in intents
that we are supporting.
We'll need to add capabilities to our shortcut.xml file.
Capabilities are expressions of the relevant feature of an app
and it contains the built-in intent and its fulfillment.
Here, we have a capability that is
tethered to the GET_CHARGING BII and a list of related
parameters.
The intent tag contains all the information
for the fulfillment.
Let's walk through it.
Starting with a deep link, here is an example of one
with the supported parameters.
There are several supported parameters,
like type for situations where the user might
say fast or free charging.
Next is name, which covers situations
where user might say, find parking
near Google headquarters.
After that, address, which covers situations
if the user provides an address like 1600 Amphitheater
Parkway, Mountain View.
Finally, for situations where the user provides
the latitude and longitude or Google can
pinpoint to the latitude and longitude,
you can capture that too.
When the GET_CHARGING_STATION BII gets matched,
the parameter and values are appended to the deep link
and passed to the fulfillment methods.
Next, let's specify the fulfillment implementation
in our car session.
If a session is not created, an intent to start the app
will create the session and pass the intent
in the onCreateScreen method.
If a session is already created in memory,
the session will reuse the same intent
and pass the intent to the onNewIntent method.
Here's an example of how Android apps get
the value of the GET_CHARGING_STATION deep link
when creating a session.
The deep link contains all the parameters matched by the BII,
so the app can act on what the user said.
Similarly, when a session is already created,
the deep link would be pass on onNewIntent
with all the parameters matched by the BII.
Here's an example of how the Android
app gets the value of a GET_CHARGING_STATION deep link.
Please note that the Car App Library currently only supports
deep fulfillment and that we're working on Android intent
support.
Be sure to check out the docs to find out
when it gets supported.
Let's now add voice support to your users
by implementing App Actions in the Car App.
Back to Madhukar to wrap this up.
MADHUKAR SRIVASTAVA: Thanks, Jessica.
Let's do a quick recap.
Assistant surfaces content for Android for Car apps
and Android mobile apps across many surfaces like auto.
Android developers can extend their Android apps to Assistant
with App Actions.
App Actions has Built-In Intents, or BIIs,
for apps using the Car App Library,
like GET_PARKING_FACILITY and GET_CHARGING_STATION
to provide voice support in the car.
These BIIs allow developers to leverage
Assistant's natural language understanding
and provide a safe way for the users
to get the functionality they want.
We are looking forward to adding more BIIs in the future.
To get started, check out these links
for more information about Android
for Cars and App Actions.
On behalf of Jessica and me, thank you for joining us today.
And we are excited for the road ahead with you.
JESSICA DENE EARLEY-CHA: Thank you so much, Madhukar,
for sharing with us.
We hope that you liked today's show.
If you have suggestions for future episodes,
please leave a comment below.
Follow us on Twitter for updates and new episodes.
Don't forget to also sign up for our newsletter.
I've been Jessica, chat with you next time.
[MUSIC PLAYING]