The car is not somewhere you can sideload an app into
Android Auto's Unknown sources setting covers media, messaging and parked apps; it has never covered the Car App Library, so the README's advice to turn it on could not have worked. A head unit lists DriverVault only when Play was the installer — an internal track is enough — and the Desktop Head Unit is what takes a sideloaded build. Say that instead, and say which APK the DHU wants, since only a debug build allows its host. minCarApiLevel also claimed a floor lower than the screens stand on: GarageScreen asks for ConstraintManager, which is level 2. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3c34b708b9
commit
6393543bf5
+17
-9
@@ -295,15 +295,23 @@ Running it on your own car:
|
||||
- The service is declared under `androidx.car.app.category.IOT`. It is the
|
||||
closest of the categories the library defines — DriverVault is a garage, not a
|
||||
map, a media player or a parking service — and a Play Store submission would
|
||||
be reviewed against it. This build is sideloaded, so what matters instead is
|
||||
the next line.
|
||||
- Android Auto refuses apps it did not get from the Play Store until you tell it
|
||||
otherwise: in the **Android Auto** settings on the phone, tap the version ten
|
||||
times to unlock **Developer settings**, then turn on **Unknown sources**.
|
||||
- To try it without a car, run Google's
|
||||
[Desktop Head Unit](https://developer.android.com/training/cars/testing/dhu).
|
||||
A debug build accepts any host so the DHU can connect; a release build only
|
||||
accepts the signed hosts the library ships an allowlist for.
|
||||
be reviewed against it. Getting it onto a car at all is the next line.
|
||||
- **A sideloaded build never appears on a real head unit**, and no setting on the
|
||||
phone changes that. Android Auto's **Unknown sources** developer option is the
|
||||
one everybody reaches for here, but it covers media, messaging-notification and
|
||||
parked apps only — [Google's testing
|
||||
guide](https://developer.android.com/training/cars/testing) says in as many
|
||||
words that it does not apply to apps built with the Car App Library. A car will
|
||||
list DriverVault only if the APK was installed *from Play*: an internal testing
|
||||
track, or internal app sharing, is enough — no public listing, no review.
|
||||
- To try it without Play — which is how these screens were written — run Google's
|
||||
[Desktop Head Unit](https://developer.android.com/training/cars/testing/dhu),
|
||||
which does take a sideloaded build. In the **Android Auto** settings on the
|
||||
phone, tap the version ten times to unlock **Developer settings**, then
|
||||
**Start head unit server**; on the machine, `adb forward tcp:5277 tcp:5277` and
|
||||
run `desktop-head-unit`. Install the **debug** APK for this: a debug build
|
||||
accepts any host so the DHU can connect, while a release build only accepts the
|
||||
signed hosts the library ships an allowlist for.
|
||||
|
||||
## Configure the API endpoint
|
||||
|
||||
|
||||
@@ -50,9 +50,13 @@
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.car.application"
|
||||
android:resource="@xml/automotive_app_desc"/>
|
||||
<!-- Level 2, not 1: GarageScreen asks the host for ConstraintManager to
|
||||
size its list, and that service arrived at level 2. Every shipping
|
||||
host is far above this; the floor just has to not claim less than
|
||||
the screens actually use. -->
|
||||
<meta-data
|
||||
android:name="androidx.car.app.minCarApiLevel"
|
||||
android:value="1"/>
|
||||
android:value="2"/>
|
||||
<service
|
||||
android:name=".car.DriverVaultCarAppService"
|
||||
android:exported="true">
|
||||
|
||||
Reference in New Issue
Block a user