Make Android Auto an opt-in build flag

Android Auto support is now merged into the app only when building with
-PandroidAuto=true (flutter build apk --android-project-arg=androidAuto=true).
The car application meta-data and automotive_app_desc.xml move to
android/app/src/androidAuto/, so default builds no longer declare Android
Auto. Notification replies from the shade and watches are unchanged.
This commit is contained in:
zjs81 committed 2026-10-24 20:22:12 -07:00
1 parent caee4d5c19
commit fe7e72a421
6 files changed
+38 -7

No files matched your search

+3 -3
View File
@@ -49,7 +49,7 @@ See the [user documentation](documentation/README.md), [connection guide](docume
- **Contact Groups**: Create custom groups to organize your mesh network contacts - **Contact Groups**: Create custom groups to organize your mesh network contacts
- **Message Reactions**: React to messages with emoji responses - **Message Reactions**: React to messages with emoji responses
- **Message Replies**: Thread conversations with inline reply functionality - **Message Replies**: Thread conversations with inline reply functionality
- **Android Auto & Watches**: Hear messages and reply by voice in Android Auto, or reply from the notification shade and Wear OS/Galaxy watches ([guide](documentation/notifications.md#android-auto)) - **Android Auto & Watches**: Reply from the notification shade and Wear OS/Galaxy watches, or hear messages and reply by voice in Android Auto (optional build flag) ([guide](documentation/notifications.md#android-auto))
- **Channel Muting**: Mute a channel from its chat screen, the channel list, or its notification - **Channel Muting**: Mute a channel from its chat screen, the channel list, or its notification
### Mesh Network ### Mesh Network
@@ -103,7 +103,7 @@ See the [user documentation](documentation/README.md), [connection guide](docume
| Map & Location | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Map & Location | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Device Management | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Device Management | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Repeater Hub | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Repeater Hub | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Notification replies | ✅<br>(incl. Android Auto, watches) | ❌ | ❌ | ❌ | ❌ | ❌ | | Notification replies | ✅<br>(incl. watches; Android Auto optional) | ❌ | ❌ | ❌ | ❌ | ❌ |
The matrix describes implemented functionality, not a guarantee that every feature has been tested on every device. Web device connections use Web Serial and require Chrome and a secure origin. Image inference and translation require native runtimes and are unavailable on web. Android APKs currently include only `arm64-v8a`; the minimum Android API follows the Flutter SDK used to build. The matrix describes implemented functionality, not a guarantee that every feature has been tested on every device. Web device connections use Web Serial and require Chrome and a secure origin. Image inference and translation require native runtimes and are unavailable on web. Android APKs currently include only `arm64-v8a`; the minimum Android API follows the Flutter SDK used to build.
@@ -228,7 +228,7 @@ Messages are transmitted as binary frames using a custom protocol optimized for
- **Theme**: System default, light, or dark mode - **Theme**: System default, light, or dark mode
- **Language**: Use one of 18 languages (English, Chinese, French, Spanish, Portuguese, German, Dutch, Polish, Swedish, Italian, Slovak, Slovenian, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean) - **Language**: Use one of 18 languages (English, Chinese, French, Spanish, Portuguese, German, Dutch, Polish, Swedish, Italian, Slovak, Slovenian, Bulgarian, Russian, Ukrainian, Hungarian, Japanese, Korean)
- **Notifications**: Configurable for messages, channels, and node advertisements; per-channel muting; reply, mark-as-read, and mute actions on Android notifications and watches (reply and mark-as-read in Android Auto) - **Notifications**: Configurable for messages, channels, and node advertisements; per-channel muting; reply, mark-as-read, and mute actions on Android notifications and watches (reply and mark-as-read in Android Auto when built with `--android-project-arg=androidAuto=true`)
- **Battery Chemistry**: Support for NMC, LiFePO4, LiPo, and LiPo HV battery types - **Battery Chemistry**: Support for NMC, LiFePO4, LiPo, and LiPo HV battery types
- **Message Retry**: Automatic retry with configurable path clearing - **Message Retry**: Automatic retry with configurable path clearing
+18
View File
@@ -98,6 +98,24 @@ android {
// } // }
} }
// Android Auto (notification read-aloud and voice reply) is opt-in, because
// declaring it puts the app through Play's separate Android Auto review.
// Enable it with `flutter build apk --android-project-arg=androidAuto=true`
// or `./gradlew -PandroidAuto=true ...`.
val androidAutoEnabled = (findProperty("androidAuto") as String?)?.toBoolean() == true
if (androidAutoEnabled) {
android.sourceSets.getByName("main").res.srcDir("src/androidAuto/res")
}
androidComponents {
onVariants { variant ->
if (androidAutoEnabled) {
variant.sources.manifests.addStaticManifestFile("src/androidAuto/AndroidManifest.xml")
}
}
}
flutter { flutter {
source = "../.." source = "../.."
} }
@@ -0,0 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Merged only when built with -PandroidAuto=true; see app/build.gradle.kts -->
<application>
<!-- Android Auto: message notifications can be read aloud and replied to -->
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
</application>
</manifest>
-4
View File
@@ -34,10 +34,6 @@
<receiver <receiver
android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver"
android:exported="false" /> android:exported="false" />
<!-- Android Auto: message notifications can be read aloud and replied to -->
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
+8
View File
@@ -52,6 +52,14 @@ iOS notifications do not have reply actions yet.
MeshCore Open works in Android Auto as a notification-based messaging app. There is no MeshCore screen in the car; Android Auto provides the interface. MeshCore Open works in Android Auto as a notification-based messaging app. There is no MeshCore screen in the car; Android Auto provides the interface.
Android Auto support is off by default and is compiled in only when the build passes the `androidAuto` Gradle property:
```bash
flutter build apk --release --android-project-arg=androidAuto=true
```
The flag merges `android/app/src/androidAuto/` (the `com.google.android.gms.car.application` manifest entry and `automotive_app_desc.xml`) into the app. Without it, Android Auto does not list the app. Notification replies from the shade and watches work either way.
- New direct and channel messages appear on the car display and can be read aloud. - New direct and channel messages appear on the car display and can be read aloud.
- Reply by voice or with a suggested reply; replies follow the rules above (splitting, failure notifications, no translation). - Reply by voice or with a suggested reply; replies follow the rules above (splitting, failure notifications, no translation).
- Android Auto shows **Reply** and **Mark as read**. **Mute channel** is marked as a mute action, but Android Auto only documents reply and mark-as-read for messaging apps, so mute may not appear in the car; use the phone, a watch, or the bell icon. - Android Auto shows **Reply** and **Mark as read**. **Mute channel** is marked as a mute action, but Android Auto only documents reply and mark-as-read for messaging apps, so mute may not appear in the car; use the phone, a watch, or the bell icon.