Is it possible to read vehicle information like speed,distance traveled ,fuel details, in android auto apps?
I've checked https://developer.android.com/training/auto
They are not mentioning anything about it. Do Android auto have any Interface/API to get vehicle related information.
Starting with Car App API level 3, the Car App Library introduces APIs that you can use to access vehicle properties and sensors. To use the APIs with Android Auto, start by adding a dependency on androidx.car.app:app-projected to the build.gradle file for your Android Auto module.
Use CarPropertyManager instead. API for monitoring car sensor data. Listener for car sensor data change. Read sensor at the maximum rate. Read sensor in default normal rate set for each sensors. Set to true when ABS is active. This sensor represents vehicle speed in m/s. Oil level sensor. Outside Environment like temperature.
Screens and apps on Android Auto If you’ve been using the Android Auto app on your phone screen, you’ll need to switch to Google Assistant’s driving mode, a new integrated driving experience. If your car is compatible with Android Auto, you can still connect directly to your car’s display.
The Android for Cars App Library allows you to bring your navigation, parking, and charging apps to the car. It does so by providing a set of templates designed to meet driver distraction standards and taking care of details such as the variety of car screen factors and input modalities.
An OBD interface is a good option - Mojio, Zubie, and Automatic are commercial options, or you could even build your own with OpenXC !
But... it is coming. The 5th tab on the display is currently is a dead end, but if you enable developer mode, you can see placeholder options in the UI, and there IS a library with event listeners that the OS (which is probable Win CE or RIM's QNX, skinned by the OEM - pretty much like the Android hardware ecosystem as a metaphor) can choose to post events to... so, the API is just not public right now, presumably while Android negotiates with the OEMs to get a larger-than-piecemeal buyin...
(see this article for how to enable developer mode and to preview the placeholder information...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With