Can only get 4 properties from carPropertyList

1,127 views
Skip to first unread message

Nika Gerson Lohman

unread,
Apr 27, 2021, 8:45:57 PM4/27/21
to Android Automotive OS Discussion Group
Hi all,

See also the following message on the car-samples github. Maybe this group is more suitable asking these questions?

https://github.com/android/car-samples/issues/12

Any thoughts why I can only get 4 properties?

CarPropertyConfig{mPropertyId= 287310850 > PARKING_BRAKE_ON
CarPropertyConfig{mPropertyId= 289408000 > GEAR_SELECTION
CarPropertyConfig{mPropertyId= 289408001 > CURRENT_GEAR
CarPropertyConfig{mPropertyId= 289408009 > IGNITION_STATE

When I list all properties, I only see the above 4:

// Create a list of properties in debug window val carPropertyList = carPropertyManager.propertyList Log.d(TAG, "carPropertyList: " + carPropertyList.toString()) for (i in 0 until carPropertyList.size) { val carProperty = carPropertyList[i] data.add(carProperty.toString()) }

If I try to register any other property, I get an error:
E/CarPropertyManager: registerListener: propId is not in config list: 291504647

Here's the code I try to use:

// Subscribes to the car speed events. carPropertyManager.registerCallback( carPropertyCarSpeedListener, VehiclePropertyIds.PERF_VEHICLE_SPEED, CarPropertyManager.SENSOR_RATE_ONCHANGE )

I did add CAR_SPEED permission to my manifest:

<uses-permission android:name="android.car.permission.CAR_SPEED" />

Regards,

Nika.

Android Automotive OS Discussion Group

unread,
Apr 28, 2021, 7:01:16 PM4/28/21
to Android Automotive OS Discussion Group, nik...@gmail.com
Please try this adb command "adb shell dumpsys activity service com.android.car get-carpropertyconfig" to see if the speed sensor is listed in the device. are you getting this error on emulator (which one?) Or bench or actual car ? 

Nika Gerson Lohman

unread,
Apr 29, 2021, 11:59:40 AM4/29/21
to Android Automotive OS Discussion Group

Hi,

 

I have tried this in several emulators:

  • Volvo XC40 P8 API29
  • Polestar 2 API29
  • Automotive API29

 

Note that I tried running it on API28 too, but that crashes. API30 is not yet published for AAOS I think?

 

I also tested in the actual car (Volvo XC40 P8) by running a test-release app over Google Play (sideload / adb and such is not possible in the car).

 

Note that actually publishing it to the car is going to be a problem anyway, as they do not (yet) support anything other than media apps:

 

Automotive Support 
Your app does not contain proper support for the Android Automotive OS. Refer to the
Automotive OS Developer Documentation for more information. 

  • For example, your app contains launcher intent in the manifest
  • For example, your app contains driver optimized activities
  • For example, your app category is not set to audio.
  • For example, your app does not declare a MediaBrowserService.

Results of the adb command (on the emulators) are:

 

SERVICE com.android.car/.CarService ceed396 pid=2088

  Client:

    Commands not supported in user

 

SERVICE com.android.car/.PerUserCarService 79b2bdb pid=2409

  Client:

    nothing to dump

 

SERVICE com.android.car.media/.service.MediaConnectorService 8f6f4b6 pid=3149

  Client:

    nothing to dump

 

Regards/Groet,

 

Nika.

Nika Gerson Lohman

unread,
May 5, 2021, 10:18:04 AM5/5/21
to Sunil Bhatia, Android Automotive OS Discussion Group

Hi Sunil,

 

No, we cannot. See Google’s response to my attempt to publish an app like that. I also tried an updated version, as the initial one got allowed in the test-track only, but this time it got denied. So far it would only be possible to ad Media App or short form Messaging.

 

Here's google’s response:

Step 1: Fix the eligibility issue with your app (com.gersonlohman.carpropertiesviewer)

During review, we were unable to accept your app for Android Auto. At this time, we are only accepting apps within the Media or short form Messaging categories for Android Auto. Media apps that use Text-To-Speech engine readout for content are not permitted at this time.

Step 2: Submit an updated app for another review

  1. Read through the Android Auto App Quality Guidelines.
  2. Make appropriate changes to your app, and be sure to address the issue described above.
  3. Increment the version number of the upgraded APK.
  4. Select Store presence > Store listing, and click Resubmit app.

Or, if you’d like to exclude your app from Android Auto: 

  1. Remove the Android Auto Manifest Entry from your APK code.
  2. Sign in to your Play Console and upload the new APK.
  3. Submit the update to your app.

Regards/Groet,

 

Nika.

+31620401350

 

From: Sunil Bhatia <sunilbh...@gmail.com>
Sent: woensdag 5 mei 2021 11:48
To: Android Automotive OS Discussion Group <automotive...@android.com>
Cc: nik...@gmail.com <nik...@gmail.com>
Subject: Re: Can only get 4 properties from carPropertyList

 

Hi Nik,

 

Do you know Can we publish apps which are not related to Media App category, like e.g. Driver Safety . E.g. or Car Controls etc.

Looking forward to your reply.

 

Thanks and Regards

Sunil Bhatia

Sunil Bhatia

unread,
May 5, 2021, 10:18:31 AM5/5/21
to Android Automotive OS Discussion Group, nik...@gmail.com
Hi Nik,

Do you know Can we publish apps which are not related to Media App category, like e.g. Driver Safety . E.g. or Car Controls etc.
Looking forward to your reply.

Thanks and Regards
Sunil Bhatia



On Thursday, 29 April, 2021 at 9:29:40 pm UTC+5:30 nik...@gmail.com wrote:

Sunil Bhatia

unread,
May 5, 2021, 2:52:48 PM5/5/21
to Android Automotive OS Discussion Group, nik...@gmail.com, Sunil Bhatia
Hi Nik,
Thanks for your response and also sharing response from Google on this.
It is much appreciated.

Thanks and Regards
Sunil Bhatia

 

Reply all
Reply to author
Forward
0 new messages