Skip to content

Migrate Android Auto implementation to androidx.car.app:app:1.7.0 - #2008

Open
rainman74 wants to merge 1 commit into
DrKLO:masterfrom
rainman74:fix/android-auto-1.7
Open

Migrate Android Auto implementation to androidx.car.app:app:1.7.0#2008
rainman74 wants to merge 1 commit into
DrKLO:masterfrom
rainman74:fix/android-auto-1.7

Conversation

@rainman74

Copy link
Copy Markdown

The car-app code introduced in 12.8.0 already uses the 1.7.x API (ConversationItem, ConversationCallback, CarMessage), but the build.gradle still pinned androidx.car.app:app:1.4.0. This left the CarAppService code path in an unbuildable state. Bump the dependency and align the rest of the codebase with the 1.7.x contract.

Build / manifest

  • androidx.car.app:app 1.4.0 -> 1.7.0
  • drop androidx.car.app:app-projected (1.4-era AAR, unused in 1.7+)
  • add androidx.media:media:1.7.0 (AndroidX media session)
  • add androidx.lifecycle:lifecycle-runtime:2.7.0 (DefaultLifecycleObserver)
  • minCarApiLevel 5 -> 7 (required by ConversationItem @RequiresCarApi(7))
  • automotive_app_desc.xml: add 'template' for the new CarAppService messaging category, keep 'media' for MusicBrowserService and 'notification' for the regular notification path

Code

  • Migrate every android.support.v4.media.* import to androidx.media.* (TelegramMediaSession, MusicPlayerService, PipActivityController, MusicSongsScreen, and the vendored ExoPlayer mediasession extensions MediaSessionConnector / TimelineQueueEditor / TimelineQueueNavigator).
  • NotificationsController: drop the CarExtender-based fallback that the 1.4-era PR Fixes: Attempt fixes for android auto notification #1902 path relied on. The 1.7.x CarAppService now drives the messaging surface, so the deprecated NotificationCompat.CarExtender payload is no longer needed.
  • HomeScreen: ensure Person always carries a key, which the 1.7.x ConversationItem.validateSender() requires.

Tested locally via brace-count + import audit. Full compile needs 'gradlew assembleArm64Debug' on a workstation with Android SDK + local.properties (not in this repo). The current 1.4.0 dep in master means the existing CarAppService code path never linked.

The car-app code introduced in 12.8.0 already uses the 1.7.x API
(ConversationItem, ConversationCallback, CarMessage), but the
build.gradle still pinned androidx.car.app:app:1.4.0. This left the
CarAppService code path in an unbuildable state. Bump the dependency
and align the rest of the codebase with the 1.7.x contract.

Build / manifest
- androidx.car.app:app 1.4.0 -> 1.7.0
- drop androidx.car.app:app-projected (1.4-era AAR, unused in 1.7+)
- add androidx.media:media:1.7.0 (AndroidX media session)
- add androidx.lifecycle:lifecycle-runtime:2.7.0 (DefaultLifecycleObserver)
- minCarApiLevel 5 -> 7 (required by ConversationItem @RequiresCarApi(7))
- automotive_app_desc.xml: add 'template' for the new CarAppService
  messaging category, keep 'media' for MusicBrowserService and
  'notification' for the regular notification path

Code
- Migrate every android.support.v4.media.* import to androidx.media.*
  (TelegramMediaSession, MusicPlayerService, PipActivityController,
  MusicSongsScreen, and the vendored ExoPlayer mediasession extensions
  MediaSessionConnector / TimelineQueueEditor / TimelineQueueNavigator).
- NotificationsController: drop the CarExtender-based fallback that the
  1.4-era PR DrKLO#1902 path relied on. The 1.7.x CarAppService now drives
  the messaging surface, so the deprecated NotificationCompat.CarExtender
  payload is no longer needed.
- HomeScreen: ensure Person always carries a key, which the 1.7.x
  ConversationItem.validateSender() requires.

Tested locally via brace-count + import audit. Full compile needs
'gradlew assembleArm64Debug' on a workstation with Android SDK +
local.properties (not in this repo). The current 1.4.0 dep in master
means the existing CarAppService code path never linked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant