Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit e047753

Browse files
MuniSakkuruMuni Sakkuru
authored andcommitted
Version 4.2.0 Alexa Auto SDK
The Alexa Auto SDK is for automotive OEMs to integrate Alexa directly into vehicles. **v4.2.0** * v4.2.0 released on 2022-12-21 **Enhancements** **Auto SDK** * Added `MultiAgent` components in AVS Device SDK. All the AVS directives and events are tagged with assistant ID. With the new MultiAgent environment, agent-based metrics are also introduced. The metrics can now be filtered by assistants, programs, and sources. * When receiving `AlexaClient` messages, the payload of `DialogStateChanged` message will now have the ID of the assistant that the change is associated. * Disabled timers, alarms, and reminders by removing the `Alerts` AVS capability from the Engine. The corresponding `Alerts` AASB messages and Engine configuration are also removed. * The Alexa Auto SDK 3rd Party Wake Word (3PWW) feature provides OEMs an opportunity to enable support for 3rd party voice assistants (3PVA) such as Apple Siri on the same in-vehicle infotainment system alongside Alexa Custom Assistant (ACA)/Alexa wake words. * Added the AASB message `AudioPlayer.SetAsForegroundActivity`, which the application can use to tell the Auto SDK Engine that the Alexa `AudioPlayer` interface is the foreground media source the user sees on screen. The `SetAsForegroundActivity` message is useful to ensure VUI and GUI commands act on the `AudioPlayer` source for scenarios in which the user played an Alexa media source (e.g., Amazon Music), switched to a different Alexa-aware external media source like FM radio or a deep-linked media app, and then manually returned visual activity to the Alexa media screen. The Alexa Auto App is updated to use the new message in the Alexa `MediaSession`. * Updated the Alexa cloud retention period for address book storage from 24 hours to 30 days. Implementations can now reduce data usage by reducing the frequency of address book upload accordingly. * Updated the Auto SDK to use AVS Device SDK Version 1.26.0. For information about this version of AVS Device SDK, see the [AVS Documentation](https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk-1-2x/release-notes.html#version-1260). **Alexa Auto App** * Renamed the AACS Sample App to Alexa Auto App. Any previous mentions of the name AACS Sample App should be treated the same as Alexa Auto App. * Added a landing page to Alexa Auto App. The landing page provides sample utterances for supported domains and UI to update the settings. * The Alexa Auto App has an updated UI for setup and settings screens. These improvements scale responsively for medium landscape screens (approximately 1300 x 900 resolution and screen size ranging from 1100dp to 1549dp). * Updated Alexa Auto App to post a [notification](https://developer.android.com/training/cars/notifications) to the Notification Center when Alexa delivers a notification to the user. The user must ask Alexa to read their notifications to hear the notification content. * Simplified building of the Alexa Auto App by reducing the number of build options during setup. * Added SMS features to Alexa Auto App. The user can ask Alexa to read unread messages, send a message to a phone number or contact, and reply to a message using the primary bluetooth connected mobile phone. * Removed the red voice chrome animation previously used when Alexa was not available. The voice chrome now uses the standard blue speaking animation as Alexa speaks an error prompt. **Resolved Issues** **Auto SDK** * Fixed an issue in which the Engine would not send an `AudioOutput.Resume` message to the client app in cases where the client has not yet responded to the previous `AudioOutput.Pause` message. This could cause a state where the SDK thinks the transient pause initiated for user and Alexa dialog never finished, preventing any further Alexa media from playing until the head unit restarts. * Fixed a race condition in `DoNotDisturb` capability agent that could cause a crash during Engine shutdown. * Fixed an issue in which Alexa speech did not play when the user asks to redial while their phone is disconnected. * Updated `MessageStream::write()` to return 0 when writing the data to the consumer fails rather than returning the data size. * Fixed issues in which the Engine did not send the `TemplateRuntime.ClearTemplate` message at the right time. * Pinned Conan package revisions of various dependencies to avoid sudden failures building Auto SDK. * Fixed an issue in which the Engine did not send `TemplateRuntime.ClearPlayerInfo` when the user signs out. * Fixed an issue in which the `Navigation.StartNavigation` AASB message did not include the correct POI details of the destination when the user selected the destination from the POI card shown on screen. Previously the “name” field in the template payload was populated with the address instead of the POI name. * Fixed an issue in which the local navigation skill produced a second, duplicate `TemplateRuntime.RenderTemplate` message for the `LocalSearchDetailTemplate1` card when the user started offline navigation with Alexa. * Fixed an issue in offline mode in which Alexa did not recognize followup requests like "select the first one" after the user requests a search for POIs or addresses. **Alexa Auto App** * Fixed various issues in the Alexa media session: * Rather than leaving the media session active and open indefinitely, the media session deactivates, stops its service, and removes the foreground service notification when media is no longer playing. The media service also sets the session to be inactive when the user signs out of their Alexa account or disables Alexa on the head unit. * The media session no longer reports error states when there is no player or sign-in error. The issue in which the error state could overtake a valid state of active media and remove all its supported controls from the session, breaking the media app UI and the instrument cluster or media widget display, is also resolved. * Previously, if the user played Alexa media and then switched to the Spotify app or a local media source, Alexa media could not resume with voice or button press after the user switched back to the Alexa media UI . This is resolved so the user can switch between the two types of Alexa-aware players and properly pause or resume the content they are viewing on screen. * The media session clears its playback data and stops playback when the customer signs out of their Alexa account on the head unit. Also resolved the issues that un-recoverably corrupted the state of the media session after user sign out. * Fixed issues in which the media session could report unexpected playback states to Auto SDK, causing problems such as not being able to resume properly when paused for an utterance or skipping to the next song unexpectedly. * Fixed an issue in which the Alexa Voice UI would remain open and transparent after the voice session ended. * Fixed an issue in which the points of interest display card remained open when navigation started. Previously, the user had to manually close the card. * Fixed an issue in which the wake word is recognized before the user signed in to their Alexa account when LVC is enabled. * Fixed an issue in which the “None” string in the Alexa communications settings was always displayed in English. * Fixed an issue in which asking Alexa to set the volume updated the volume on the head unit as expected, but Alexa would respond with the wrong value to subsequent voice requests like "Alexa, what's the volume?" * Fixed a crash when using local media source control when notification listener access was not granted. [Allowlisting](https://source.android.com/docs/core/permissions/perms-allowlist) the Alexa Auto App for privileged install permission [MEDIA_CONTENT_CONTROL](https://developer.android.com/reference/android/Manifest.permission#MEDIA_CONTENT_CONTROL) prior to installation is required by default, and notification listener access is no longer required to use local media source control. * Fixed an issue in which the user could not add an additional stop to the active navigation route because Alexa could not properly retrieve navigation context from the head unit. * Fixed an issue with offline calling in which Alexa would repeatedly prompt "Which phone number or contact do you want to call?" without ending the interaction if she could not resolve the user's requested contact name. * Fixed an external wake word engine integration issue. * Improved app stability **Known Issues** **Auto SDK** **General** * The [Alexa Automotive UX guidelines](#https://developer.amazon.com/en-US/docs/alexa/alexa-auto/display-cards.html#dismiss-display-cards) specify when to automatically dismiss a `TemplateRuntime` display card for each template type. The Engine publishes the `TemplateRuntime` interface messages `ClearTemplate` and `ClearPlayerInfo` based on the timeouts configured in the `aace.alexa.templateRuntimeCapabilityAgent` Engine configuration. However, the configuration does not provide enough granularity to specify timeouts for different types of display cards. Consequently, there is no way for your application to configure automatically dismissing local search templates (e.g., `LocalSearchListTemplate2`) with a different timeout than other templates (e.g., `WeatherTemplate`). The configuration also does not provide a way for you to specify infinite timeout for `NowPlaying` cards. You must implement your application’s dismissal logic for display cards and media info accordingly. * There is a rare race condition in which publishing the `AlexaClient.StopForegroundActivity` message does not cancel the active Alexa interaction. The race condition can happen when the application publishes the message at the beginning of the `THINKING` state `AlexaClient.DialogStateChanged` transition. **Car control** * If you configure the Auto SDK Engine and connect to Alexa using a set of endpoint configurations, you cannot delete any endpoint in the set from Alexa. For example, after you configure set A with endpoints 1, 2, and 3, if you change your car control configuration during development to set B with endpoints 2, 3, and 4, Alexa retains endpoint 1 from set A, which might interfere with resolving the correct endpoint ID for your utterances. However, any endpoint configurations with matching IDs override previous configurations. For example, the configuration of endpoint 2 in set B replaces endpoint 2 in set A. During development, limit configuration changes to create only supersets of previous endpoint configurations. Work with your Solutions Architect or Partner Manager to produce the correct configuration on the first try **Communications** * The dual-tone multi-frequency (DTMF) does work correctly when selecting the number 1. * Alexa-to-Alexa calls do not work on Linux armv8 platforms **Entertainment** * When music is playing, repeatedly pressing the “next” button to advance in the playlist restarts the current song. * When using the LVC extension, if the application publishes the `MediaPlaybackRequestor.RequestMediaPlayback` AASB message before the Auto SDK Engine connects to Alexa cloud, media playback will not automatically resume as expected. The workaround is to wait for the connection to Alexa cloud to complete before publishing the `RequestMediaPlayback` message. **Local Voice Control** * Alexa responds with an error to the utterance "Play FM radio" and requests to tune to a station name. "Change to FM radio" and "Switch to FM radio" work as expected. * Some contacts in the addressbook are not resolved correctly in offline mode. **C++ sample app** * The sample app may fail to handle synchronous-style `AASB messages` within the required timeout to construct device context for Alexa. As a result, some utterances may not work as expected. **Alexa Auto App** * If there is no internet connection when the user launches Alexa for the first time in the ignition cycle, the “No Network Connection” message displays momentarily and disappears. * The Alexa Auto App doesn’t reconnect to LVC when when the user switches the default assistant from Alexa to a different voice assistant and then back to Alexa. Alexa Auto App needs to be restarted (e.g., by a new ignition cycle) to reconnect to LVC. * Alexa can take up to 90 seconds to reconnect when lost network connection is restored. * If the user has two phones connected to the head unit and asks Alexa to read their SMS messages, the reply comes from the secondary phone instead of the primary phone. * When the user asks Alexa to read their messages after she has already read them, Alexa reads the same messages again instead of replying that there are no new messages to read. [Read the SDK Docs](https://alexa.github.io/alexa-auto-sdk/docs/)
1 parent 37f3d7b commit e047753

2,100 files changed

Lines changed: 172146 additions & 221239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
-93.1 KB
Binary file not shown.
92.1 KB
Binary file not shown.

NOTICE

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
4040
or implied. See the License for the specific language governing permissions and
4141
limitations under the License.
4242

43+
***************************
44+
ALEXA AUTO SDK COMPONENTS
45+
***************************
46+
The following Alexa Auto SDK sub-component is licensed under the Amazon Software License:
47+
- modules/core/Arbitrator
48+
49+
You may not use this file except in compliance with the Amazon Software License. A copy
50+
of the Amazon Software License is located at:
51+
52+
http://aws.amazon.com/asl/
53+
4354
**********************
4455
THIRD PARTY COMPONENTS
4556
**********************
@@ -126,7 +137,7 @@ http://vadikom.com
126137
Licensed MIT
127138
----------------------------------------
128139

129-
AACS Sample App includes the following open source Google material design icons:
140+
Alexa Auto App includes the following open source Google material design icons:
130141

131142
Google material design icons - v4.0.0 - August 31, 2020
132143
https://github.com/google/material-design-icons/blob/master/android/av/album/materialicons/black/res/drawable/baseline_album_24.xml
@@ -142,4 +153,4 @@ https://github.com/google/material-design-icons/blob/master/android/navigation/c
142153

143154
Google material design icons are under Apache License Version 2.0
144155
https://github.com/google/material-design-icons/blob/master/LICENSE
145-
----------------------------------------
156+
----------------------------------------

aacs/android/README.md

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -33,63 +33,6 @@ supports streaming audio data to and from an external application. It builds int
3333
9. The core of the **HMI application** that holds the business logic need not change with
3434
`AlexaAutoClientService`. However, you must modify the application so that it can interface with the APIs defined by AACS.
3535

36-
## Obtaining the AACS AAR
37-
AACS is packaged as an Android library (AAR). You can obtain the AACS AAR in one of two ways:
38-
39-
* To obtain the pre-built AACS AAR and the other dependency AARs which are required for using AACS, contact your Amazon Solutions Architect (SA) or Partner Manager for more information.
40-
41-
* To build the AACS AAR from source code, following the steps below.
42-
43-
1. Enter the following command to change the directory:
44-
```
45-
cd ${AAC_SDK_HOME}/aacs/android/service
46-
```
47-
48-
2. Enter the following command to start the local build.
49-
```
50-
./gradlew assembleLocalRelease
51-
```
52-
53-
This command builds AACS core service, as well as all the other needed dependencies (such as Auto SDK) required for AACS to function. It also generates AAR files that are used for communicating with AACS from your application.
54-
55-
To install all the generated AARs to your application, add the `installDeps` task after the build command. Specify the path you want the artifacts to be installed to by using the `-PinstallPath` option. If `-PinstallPath` is not specified, the artifacts will be copied to `alexa-auto-sdk/aacs/android/service/deploy` by default.
56-
57-
```
58-
./gradlew assembleLocalRelease installDeps -PinstallPath=<path/to/your/application/directory>
59-
```
60-
61-
## Using AACS with Your Application
62-
This section provides information about how AACS works with your application.
63-
64-
To build your application with AACS, you can either include AACS and the other dependencies as local sub-projects, or you can build them as AARs and copy to the libs folder of your application.
65-
66-
1. Using AACS as a local module
67-
68-
Include AACS and the other dependency libraries as sub-projects in the `settings.gradle` file of your project.
69-
In the `build.gradle` file of your application, add the following `implementation` statements:
70-
~~~
71-
implementation project(':aacs')
72-
implementation project(':aacs-extra')
73-
implementation project(':aacs-maccandroid')
74-
implementation project(':aacsconstants')
75-
implementation project(':aacsipc')
76-
implementation project(':aacscommonutils')
77-
implementation project(':alexa-auto-tts')
78-
79-
// replace the <path/to/Auto/SDK/AARs> placeholder with your path
80-
implementation fileTree(include: ['*.aar'], dir: <path/to/Auto/SDK/AARs>)
81-
~~~
82-
See the `${AUTO_SDK_HOME}/aacs/android/sample-app/settings.gradle` and `${AUTO_SDK_HOME}/aacs/android/sample-app/alexa-auto-app/build.gradle` files of the AACS Sample App for more information.
83-
84-
2. Using AACS as a local binary
85-
86-
Include the AARs in the libs folder of your application. See [Obtaining the AACS AAR](#obtaining-the-aacs-aar) for instructions of how to obtain the AACS AARs.
87-
88-
Add the following `implementation` statement to the `build.gradle` file of your application:
89-
~~~
90-
implementation fileTree(dir: 'libs', include: ['*.aar'])
91-
~~~
92-
9336
### AACS as Foreground Service or System Service
9437
AACS runs as a started service on Android. The [Initialization](#initialization) section describes how it is started; this section describes what you do to run AACS as a foreground service or a system service.
9538

@@ -812,11 +755,3 @@ String payload = intent.getStringExtra(AACSConstants.PAYLOAD);
812755
You can use AACS instrumentation to log AASB messages for debugging purposes. For more information about how to use instrumentation, see the [AACS Instrumentation README](./service/core-service/src/debug/java/com/amazon/alexaautoclientservice/README.md).
813756

814757
>**Note:** You can use instrumentation only if you use the debug option when building the Auto SDK with AACS.
815-
816-
## Including App Components with AACS AAR in your application
817-
The Auto SDK provides packages (also called "app components") in the [`$AAC_SDK_HOME/aacs/android/app-components`](./app-components) directory. App components could be included in your application along with AACS AAR to speed up the Alexa integration.
818-
819-
>**Note:** Some app components implement the handling of AASB messages for certain topics, allowing your applications to interface with AACS by using standard Android APIs. If you include such app components in your application with AACS AAR, your application does not need to handle the AASB messages for those particular AASB topics.
820-
821-
## AACS Sample App
822-
The Auto SDK includes an Android-based application that demonstrates how an application uses AACS. For more information about the AACS Sample App, see the [AACS Sample App README](sample-app/README.md).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# AACS App Components
1+
# Alexa Auto app components
22

3-
The AACS App Components are modularized, pre-made Android implementation libraries for Auto SDK features. The AACS Sample App uses the AACS App Components, but they are decoupled from the sample app and build independently into standalone AARs for use in any AACS client application. You can speed up your integration by reusing the App Components in your own application. See the documentation of each App Component library for its respective build and usage instructions.
3+
The Alexa Auto app components are modularized Android implementation libraries for Alexa features.

aacs/android/app-components/alexa-auto-apis/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 28
5+
compileSdkVersion 32
66
defaultConfig {
7-
minSdkVersion 25
8-
versionCode 1
9-
versionName "4.1.1"
7+
minSdkVersion 27
8+
targetSdkVersion 27
9+
versionCode Integer.parseInt(new Date().format("yyyyMMdd"))
10+
versionName "4.2"
1011
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1112
}
1213
buildTypes {
@@ -47,4 +48,6 @@ dependencies {
4748
implementation deps.androidx_appcompat
4849
implementation deps.rxjava3
4950
implementation deps.androidx_navigation_fragment
51+
52+
implementation project(':aacscommonutils')
5053
}

aacs/android/app-components/alexa-auto-apis/src/main/java/com/amazon/alexa/auto/apis/app/AlexaAppRootComponent.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import androidx.annotation.NonNull;
1818

1919
import com.amazon.alexa.auto.apis.auth.AuthController;
20+
import com.amazon.alexa.auto.apis.media.PlayerInfoCache;
2021
import com.amazon.alexa.auto.apis.setup.AlexaSetupController;
2122

2223
import java.util.Optional;
@@ -53,6 +54,13 @@ public interface AlexaAppRootComponent {
5354
*/
5455
AuthController getAuthController();
5556

57+
/**
58+
* Provides the {@link PlayerInfoCache}.
59+
*
60+
* @return PlayerInfoCache.
61+
*/
62+
PlayerInfoCache getPlayerInfoCache();
63+
5664
/**
5765
* Activate the scoped component and bring it in scope.
5866
*

aacs/android/app-components/alexa-auto-apis/src/main/java/com/amazon/alexa/auto/apis/communication/ContactsController.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public interface ContactsController extends ScopedComponent {
4242
*/
4343
void setContactsUploadPermission(String deviceAddress, String permission);
4444

45+
/**
46+
* Set messaging permission.
47+
* @param deviceAddress device unique address
48+
* @param permission messaging permission
49+
*/
50+
void setMessagingPermission(String deviceAddress, String permission);
51+
4552
/**
4653
* Observe contacts upload consent.
4754
* @return contacts consent observable, returning true if contacts consent is needed.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0/
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.amazon.alexa.auto.apis.media
16+
17+
data class MediaSourceInfo (
18+
var url : String,
19+
var token: String,
20+
var repeating: Boolean
21+
)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0/
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.amazon.alexa.auto.apis.media;
16+
17+
import android.content.Intent;
18+
19+
import androidx.annotation.NonNull;
20+
import androidx.annotation.Nullable;
21+
22+
import com.amazon.alexa.auto.aacs.common.RenderPlayerInfo;
23+
24+
import java.util.Optional;
25+
26+
import io.reactivex.rxjava3.core.Observable;
27+
28+
/**
29+
* Cache (in memory) the most recent AudioPlayer info for the lifetime of AACS to facilitate re-populating a media
30+
* session the right metadata if the session is destroyed and re-created within a single AACS runtime cycle.
31+
*
32+
* Note that it is intentionally not implemented to cache the data across reboots because Auto SDK does not yet support
33+
* initializing AudioPlayer and TemplateRuntime capability agents with data from the last cycle. Restoring the data
34+
* into the MediaSession without doing the same to the capability agents would produce unexpected behavior.
35+
*/
36+
public interface PlayerInfoCache {
37+
/**
38+
* Update the current RenderPlayerInfo.
39+
* @param playerInfo The current RenderPlayerInfo. Empty Optional to reset the player info.
40+
**/
41+
void setPlayerInfo(@NonNull Optional<RenderPlayerInfo> playerInfo);
42+
43+
/**
44+
* Get the current RenderPlayerInfo.
45+
* @return An Optional<RenderPlayerInfo>. Empty optional when there is no active player metadata.
46+
**/
47+
Optional<RenderPlayerInfo> getPlayerInfo();
48+
49+
/**
50+
* Observe the current RenderPlayerInfo.
51+
* @return An Observable of the RenderPlayerInfo. The Optional<RenderPlayerInfo> will be empty when there is no
52+
* active player metadata.
53+
**/
54+
Observable<Optional<RenderPlayerInfo>> observePlayerInfo();
55+
56+
/**
57+
* Update the info for the current media item.
58+
* @param url The current media info. Null to reset.
59+
**/
60+
void setMediaSourceInfo(Optional<MediaSourceInfo> info);
61+
62+
/**
63+
* Get the current media source info.
64+
* @return An Optional<MediaSourceInfo>. Empty optional when there is no active media item.
65+
**/
66+
Optional<MediaSourceInfo> getMediaSourceInfo();
67+
68+
/**
69+
* Observe the current media source info.
70+
* @return An Observable of the media source info. Optional empty when there is no active media item.
71+
**/
72+
Observable<Optional<MediaSourceInfo>> observeMediaSourceInfo();
73+
74+
/**
75+
* Set the current position of the media buffered in the player.
76+
* @param position The current playback position.
77+
**/
78+
void setPlaybackPosition(long position);
79+
80+
/**
81+
* Get the last known position of the media buffered in the player.
82+
* @return The last known playback position.
83+
**/
84+
long getPlaybackPosition();
85+
86+
/**
87+
* Clear all data from the cache.
88+
**/
89+
void clearAllData();
90+
}

0 commit comments

Comments
 (0)