Open nikagersonlohman opened 3 years ago
Maybe some other permissions are needed as well 🤔
Yeah... but which... who knows... where to ask?
i also got this error. Go through this link (code line 212-220), may be it's an issue of emulator
I have the same issue in the car (Volvo XC40)...
You could try to file the issue here: https://issuetracker.google.com/issues?q=componentid:460472%20status:open# That may help.
Hi @nikagersonlohman , got the same problem, did you fix it ?
No, sorry, I abandoned it because they denied testing the app further in my car as it's not a media app which is the only allowed currently :(
I know this is slightly off-topic but I saw that you did manage to install your testing app on an XC40 P8 via the Play Store and am wondering how you did that? I've set up testing channels for other apps and I think I did this one correctly (release type is Automotive OS). On the vehicle I'm signed in to the Google Account of one of my opted-in testers. But searching the Play Store on the vehicle turns up nothing. If you managed to do this successfully can you share the method?
Hi Andrew,
I think it must have been a mistake. When I submitted the app a second time with hardly any changes, they denied it into the test phase...
This is what I got in February:
And this is what I got last month:
Regards,
Nika.
My app has been approved for testing but yes presumably they will reject it at some point.
During the brief period when your app was approved for testing did you manage to run it on the car?
Yes, and it's still running in it...
🤷♂️
How did you manage to install? On the vehicle did you just search the Play Store from a tester's google account?
Hi. I realize that my answer is already late, but I ran into this problem myself and I was able to solve it. So I am writing for those who will encounter it.
It is not enough to specify the permissions in the manifest. You need to request them in the GUI. I used the following example:
private val permissions = arrayOf(Car.PERMISSION_SPEED)
override fun onResume() {
super.onResume()
if(checkSelfPermission(permissions[0]) == PackageManager.PERMISSION_GRANTED) {
//your code here
} else {
requestPermissions(permissions, 0)
}
}
How did you manage to install? On the vehicle did you just search the Play Store from a tester's google account?
It's a bit too long ago, I do not remember exactly, but I do remember it didn't show up initially. I had to setup beta in Google Play too. If I remember correctly I clicked like 10 times on the play store version and it said I am a developer (like developer options in android, which doesn't work in the car; it did work here). Here's a screenshot of what I needed to enable (translated it says: internal share apps on google play, download and install test-versions of apps shared with you):
After that, it didn't work initially. I could find the app but couldn't install it:
But after a while, it suddenly installed and is still running (even when driving):
Hi. I realize that my answer is already late, but I ran into this problem myself and I was able to solve it. So I am writing for those who will encounter it.
It is not enough to specify the permissions in the manifest. You need to request them in the GUI. I used the following example:
private val permissions = arrayOf(Car.PERMISSION_SPEED) override fun onResume() { super.onResume() if(checkSelfPermission(permissions[0]) == PackageManager.PERMISSION_GRANTED) { //your code here } else { requestPermissions(permissions, 0) } }
Superb! I'll try that soon on the emulator (as I can't get the app to publish to the car anymore :( )
In case it helps, this file contains all the Car properties together with the required permissions: https://cs.android.com/android/platform/superproject/+/master:packages/services/Car/car-lib/src/android/car/VehiclePropertyIds.java;l=30?q=VehiclePropertyIds
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:
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:
I did add CAR_SPEED permission to my manifest: