automotive-lifecycle

Manage Android Automotive OS lifecycle transitions for CarAppService, Session, and Screen.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/jimloop/custom-claude-package --skill automotive-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: automotive-lifecycle
Source: https://github.com/jimloop/custom-claude-package/tree/main/plugins/android-automotive-code/skills/automotive-lifecycle
Command: npx skills add https://github.com/jimloop/custom-claude-package --skill automotive-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Android Automotive developers manage complex CarAppService, Session, and Screen lifecycle behavior, preventing state loss, refresh issues, and resource management mistakes in vehicle applications.

Core Features & Use Cases

  • Lifecycle Management Guidance: Provides best practices for CarAppService, Session, and Screen creation, destruction, and state transitions.
  • Template Refresh Handling: Explains invalidate-driven UI updates, LiveData integration, and efficient Template rendering patterns.
  • Use Case: Build a reliable Android Automotive app that preserves navigation state, handles vehicle reconnections, and avoids common lifecycle-related crashes.

Quick Start

Use the automotive lifecycle skill to review my Android Automotive Screen implementation and suggest lifecycle improvements.

Frequently Asked Questions about automotive-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Android Automotive Screen lose state during template rendering?

Your Android Automotive Screen loses state during template rendering when ViewModel-based state management and lifecycle coordination are not properly implemented. Applying invalidate-driven UI refresh patterns ensures state preservation and efficient template rendering across component transitions.

What's the best way to handle UI refreshes in an AAOS application?

The best way to handle UI refreshes in an AAOS application is using invalidate-driven patterns for template rendering. This approach coordinates with lifecycle callbacks and integrates ViewModel state management to trigger efficient UI updates without causing state loss.

Can I use ViewModel for state management in Android Automotive apps?

You can use ViewModel for state management in Android Automotive apps to preserve navigation state and coordinate lifecycle callbacks. This pattern ensures reliable state survival across Session and Screen transitions during vehicle reconnections or resource cleanup events.

When do I need to implement lifecycle callbacks for CarAppService components?

You need to implement lifecycle callbacks for CarAppService components when building vehicle applications that require proper state transitions, template rendering, and resource cleanup. This coordination prevents state loss and refresh issues during component creation and destruction.

How do I prevent crashes when an Android Automotive vehicle reconnects?

To prevent crashes when an Android Automotive vehicle reconnects, implement proper lifecycle coordination for CarAppService, Session, and Screen state transitions. Combining ViewModel-based state management with invalidate-driven UI refresh patterns ensures reliable state preservation during reconnections.