android-auto-companion-android
Library that will abstract away the process of associating a phone with an
Android Auto head unit. Once associated, a device will gain the ability to
unlock the head unit via BLE. The library supports both iOS and Android, the
code for which is contained with the ios and android directories
respectively.
For usage instructions, follow the Phone SDK Integration Guide.
This repository is intended to release the AAOS Companion Device program as an open source project.
Use Google Maven to obtain the SDK:
- Add Google Maven to the app repositories.
buildscript {
repositories {
google()
}
}
- Add Companion Device package to the app dependencies.
https://maven.google.com/web/index.html#com.google.android.car.connectionservice:connectionservice
dependencies {
// NOTE: use the latest version.
implementation 'com.google.android.car.connectionservice:connectionservice:3.1.2'
}
Building from Source
If you want to build the library from source, follow these steps:
1. Initialize Submodules
This project depends on the ukey2 library, which is included as a Git submodule. After cloning the repository, run the following command to fetch it:
git submodule update --init --recursive
2. Environment Setup
Java: The project requires Java 17. Please ensure that your
JAVA_HOMEenvironment variable points to a Java 17 JDK, or that your defaultjavaversion is 17.export JAVA_HOME=<path to jdk17>Android SDK: Ensure that the
ANDROID_HOMEenvironment variable is set to your Android SDK location. Example:export ANDROID_HOME=$HOME/Android/Sdk
3. Build
To build the project and generate the AARs, run:
./gradlew assembleDebug
