RadioDroid icon indicating copy to clipboard operation
RadioDroid copied to clipboard

[WIP] Revive android auto

Open morckx opened this issue 5 years ago • 11 comments

What again were the issues Google had with our android auto support? For me, it seems to work quite well.

morckx avatar May 21 '20 20:05 morckx

The needed voice search support.

See https://github.com/segler-alex/RadioDroid/issues/389

werman avatar May 21 '20 20:05 werman

The needed voice search support.

Ah, thanks. I think I had got that working, too, some time ago. I hope I'll find my changes again. One of them are already i here (68124552b357528fadcd46369f66a4a1d191071e ).

morckx avatar May 21 '20 20:05 morckx

The needed voice search support.

See #389

OK, playFromSearch is already working – tested with android-media-controller.

The most important thing that is still missing to get through the tests is probably a default station, which is played whenever nothing is found. Especially of course if RadioDroid has just been installed and there are no favorites and no history yet.

Maybe BBC World News? Or is there anything even less controversial and more generic?

Of course it would be nice if the Voice Search would also search the server before it takes the default station (if it doesn't find anything in History and Favorites). For this purpose it would be handy to have a static function in Utils for server requests.

In addition, MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH should apparently also be intercepted by the activity: https://developer.android.com/guide/components/intents-common.html#PlaySearch I don't if that's really necessary, but it would be easy in any case.

morckx avatar May 22 '20 19:05 morckx

Thanks, I'll try to check soon.

Maybe BBC World News? Or is there anything even less controversial and more generic?

I think some plain music station would be better since it would be language independent.

werman avatar May 22 '20 21:05 werman

I remember I was able to test it in the emulator, now I'm not for some reason....

Are you able to test it with in emulators?

werman avatar May 23 '20 11:05 werman

I remember I was able to test it in the emulator, now I'm not for some reason....

Are you able to test it with in emulators?

Yes, I just had to copy libcrypto.so.1.0.0 and libssl.so.1.0.0 from an old computer to /usr/local/lib64/ and added a file /etc/ld.so.conf.d/local.conf with just /usr/local/lib64 in it, after that ldconfig and it worked. In case this was your problem. And don't forget to start the head unit server from android auto (Settings->Overflow Menu->Start Head Unit Server).

Ah if you meant install Android Auto on the emulator: No I haven't managed to do it, but tried it only briefly.

morckx avatar May 23 '20 13:05 morckx

Ok, it works with real Android device.

What I think is necessary:

  • Prev/Next should work for History and not only for favourites. And potentially with other lists. Right.
  • If there is a station with broken icon url - it should not make us wait for 2s timeout on every navigation to a list with this station. I think it could be done on OkHttp level, with some interceptor, but...

Yes, and there are some more little stability issues.

morckx avatar May 23 '20 21:05 morckx

Your instrumentation tests would clash with mine https://github.com/segler-alex/RadioDroid/pull/654, better to add them afterwards.

werman avatar May 23 '20 21:05 werman

It wouldn't be hard for me to merge it together, but you are using junit5 and I've made all tests junit4, if you have any objects, could you write them in the #654? I just find instrumented tests being a bit fragile in terms of "why this test doesn't run from IDE today???", so making them junit5 adds another layer of things to go wrong. And I had enough of headache even with current setup.

werman avatar May 23 '20 21:05 werman

instead of having a list of fallback streams, why not play a prerecorded message to the user that a stream needs to be selected first. we could also use text to speech, that way we could even add it to the translatable strings.

segler-alex avatar May 23 '20 22:05 segler-alex

instead of having a list of fallback streams, why not play a prerecorded message to the user that a stream needs to be selected first. we could also use text to speech, that way we could even add it to the translatable strings.

Yes, I thought about that, too. I just wanted to have the fallback station(s) first, because that's probably the easiest way to the Android Auto approval.

I would then definitely continue with messages via TTS. We could just send the toasts that we're issuing now (depending on the settings) via TTS. We already have many translations for these.

morckx avatar May 23 '20 22:05 morckx

hi, if you are still interested. could you do another push that is not WIP? thank you for your work!!

segler-alex avatar Sep 28 '23 07:09 segler-alex

in WIP too long, closing please create another PR if you want to work on it.

segler-alex avatar Oct 16 '23 11:10 segler-alex