Search code examples
androidcan-busandroid-auto

Is it possible for OEM to share CAN bus events to Android Auto app?


Is it possible for OEM to share CAN bus events with Android Auto (not Automotive) app? I mean OEMs original apps. If it's possible, than are there any restrictions, or any CAN bus events can be shared?

UPDATE: As stated in Car App Library docs, Android Auto app can subscribe on these info: Make, Model, Year, EV connector types, Fuel types, Toll card state, Toll card type, Battery level, Fuel level, Fuel level low, Range remaining, Raw speed, Display speed, Odometer distance.

The question is whether OEM can expand this list?


Solution

  • I'm not exactly sure, but in theory, it's possible, but limited to system apps (which is not very useful).

    Android Auto head units run on the Android Automotive OS. The Car Service API gains access to car sensors using the Android Automotive hardware abstraction layer (HAL).

    System integrators can implement a vehicle HAL module by connecting function-specific platform HAL interfaces (e.g. HVAC) with technology-specific network interfaces (e.g. CAN bus).

    There's an interface in the Android Automotive package that allows writing custom vehicle hardware abstraction layer properties. However, this is restricted to system apps.

    To support partner-specific needs, the VHAL allows custom properties that are restricted to system apps.

    These properties can be accessed using CarPropertyManager, which can be obtained by calling Car.getCarService(Car.PROPERTY_SERVICE) (Documentation)