jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
1.67k stars 117 forks source link

Carplay support? #24

Open JohnGalt1717 opened 3 years ago

JohnGalt1717 commented 3 years ago

Really need this in my car like PlexAmp.

Would be really great if I can script a shortcut on iOS to start this on carplay connect and resume music where I last left off automatically.

Thanks!

jmshrv commented 3 years ago

The audio service plugin I'm using says it supports Carplay/Android Auto, but there isn't really any documentation about it (ryanheise/audio_service#593). Once there's documentation, I'll look into it :)

itscaro commented 3 years ago

+1 for Android Auto

stefan1983 commented 2 years ago

I would also love to have CarPlay support! Would be nice to have the app be able to run and select the tracks on the car play screen.

Is there anything planned? thanks a lot

jmshrv commented 2 years ago

Won't be able to fit it in for this release unless I postpone it even longer, so 0.7 it is (if its even possible, CarPlay is weird)

stefan1983 commented 2 years ago

OK.

Dedicated CarPlay support would be nice, for now the pure playback works so far:

image

But one has to switch between tracks / albums etc. directly on the phone.

stefan1983 commented 2 years ago

If you need someone to test and play around, let me know ;)

jmshrv commented 2 years ago

I'm going to remove this from the 0.7 milestone due to the amount of work it's going to need, there are other issues that need focus right now. I'll still keep this feature in mind - it's a pretty common request :)

kaysond commented 2 years ago

Bumping for support!

TCB13 commented 1 year ago

+1 on this feature! It would be very nice to have a basic UI to pick albums and initiate playback directly from the CarPlay UI instead of having to pick the phone. Thank you.

luca-vz commented 1 year ago

OK.

Dedicated CarPlay support would be nice, for now the pure playback works so far:

image

But one has to switch between tracks / albums etc. directly on the phone.

How are you able to open your app on carplay? My app crashes as soon as I open it. I followed the documentation and even went through the official Carplay Programming Guide

jmshrv commented 1 year ago

You can't just open an app directly in Carplay, you have to program a separate UI for it. I'm not sure how it works in detail, but it's definitely a very involved process.

anthonylavado commented 1 year ago

Just some reference links for anyone that decides to look into it further:

https://blog.logrocket.com/adding-carplay-flutter-app/

https://pub.dev/packages/flutter_carplay

BloodyIron commented 1 year ago

So what kind of a roadmap is there for Android Auto?

jmshrv commented 1 year ago

Carplay/Android Auto probably falls under the "massive project that will take lots of dedicated work" category, and since I don't have a car I can't really test the feature if I was to work on it. Hopefully someone else with more experience/need could start working on it.

Neoakb commented 1 year ago

So while it isn't pretty in Carplay, it does play. and uses the basic audo controls In AAuto, it stops playing completely and I have to hit play within the app again. It also doesn't allow skip/rewind to work. I also had to remove Spotify and Plexamp for it to not auto play those. Please see about adding basic functionality for AA just so that I can listen to music while getting directions.

jmshrv commented 1 year ago

It looks like audio_service has some functions related to Android Auto, but as said in the linked issue earlier they're undocumented - https://pub.dev/documentation/audio_service/latest/audio_service/AudioHandler/getChildren.html

This isn't something that I can work on myself since I'll have no way of testing it, although I'll be happy to help someone else with it

Neoakb commented 1 year ago

I can test it for sure, and I have a somewhat functional grasp of coding. How can I help?

bingobob commented 11 months ago

Just keeping this alive - great app - android auto please if poss - happy to test !

puff commented 10 months ago

Android Auto is being worked on for Finamp redesign!

~~I managed to hack in some rudimentary Android Auto support if anyone would like to try it out. https://github.com/puff/finamp/tree/android-auto~~

https://github.com/jmshrv/finamp/assets/33184334/b5076afb-865d-4733-b3cf-1ca65e93d324

For the demo, I used the Desktop Head Unit program from the Android SDK.

jmshrv commented 10 months ago

This is awesome to see, hopefully we can get this into something more concrete :)

dbolger commented 9 months ago

Looks potentially stale, but may be something worth looking in to: https://pub.dev/packages/flutter_carplay Also: https://github.com/flutterfromscratch/using-flutter-with-carplay

Chaphasilor commented 9 months ago

I believe CarPlay development requires macOS, otherwise this seems possible to do.

Also, @puff how would I go about trying this out? Just build and install your branch to my Android phone and then connect to a car? Any other required steps? Would love to try it out!

puff commented 9 months ago

I believe CarPlay development requires macOS, otherwise this seems possible to do.

Also, @puff how would I go about trying this out? Just build and install your branch to my Android phone and then connect to a car? Any other required steps? Would love to try it out!

Hi, you can either use the Desktop Head Unit emulator from the Android SDK or you could test it on your own car. To use the emulator:

  1. On your phone, go to Settings -> Apps -> Android Auto -> Additional Settings
  2. Start the head unit server on your phone through the Android Auto app
  3. Connect your phone to your pc via adb
  4. Run desktop-head-emulator.exe 4.a You may have to run adb forward tcp:5277 tcp:5277

You can debug using the DHU like normal by debugging the app on your phone through your IDE

As for CarPlay, I believe it does require macOS to be able to install it on an iPhone or to use their CarPlay simulator. Unfortunately, I have neither so I can't test it :(

truppelito commented 9 months ago

+1 for this feature as well! I think it's basically the only feature I'm missing from Spotify that I can't live without.

Chaphasilor commented 8 months ago

@puff I did manage to get it to run just now! However, only the Now Playing and queue screen are working for me, the home screen says "No Items". Any idea what could be the cause here? Haven't had a chance to dive into the logs just yet.
Also, all of the refactoring you did with the TabContentType and MediaItemHelper, are these necessary for Android Auto support? I'm asking because re-creating your changes in the current version seems easier than rebasing at this point, especially with the redesign coming up...

Edit: Here are some photos of Finamp running on an actual car 🥳

![image](https://github.com/jmshrv/finamp/assets/18015147/f08b2bc9-682e-4e27-b716-08b94c09772c) ![image](https://github.com/jmshrv/finamp/assets/18015147/a9d771ea-3d5a-486a-af5d-a757c94c0295)

puff commented 8 months ago

@puff I did manage to get it to run just now! However, only the Now Playing and queue screen are working for me, the home screen says "No Items". Any idea what could be the cause here? Haven't had a chance to dive into the logs just yet. Also, all of the refactoring you did with the TabContentType and MediaItemHelper, are these necessary for Android Auto support? I'm asking because re-creating your changes in the current version seems easier than rebasing at this point, especially with the redesign coming up...

Edit: Here are some photos of Finamp running on an actual car 🥳

The issue with "No Items" seems to be with the latest commit on my branch. That's what I get for not testing lol. I've pushed a fix for it. The TabContentType refactors aren't necessary, a new enum could be created instead. I just thought I may as well use the one already there, but I see how it can be confusing. As for MediaItemHelper, Android Auto uses MediaItem and I thought that would be the best way to incorporate it. I was waiting for the redesign to continue this feature, but feel free if you want to add it :P

seang96 commented 8 months ago

Testing this build out, does it work well with offline support? I turned the app on offline mode after downloading songs and it seems that the lists still try to download on the car display. Unfortunately, at my work parking lot the signals are so bad that I can't get the music started.

bingobob commented 8 months ago

Noob question. Is there a build with android auto available and can I get a link to it please? More than happy to test in my car! Would be brilliant, love finamp, in the car - it would be superb!

seang96 commented 8 months ago

Noob question. Is there a build with android auto available and can I get a link to it please? More than happy to test in my car! Would be brilliant, love finamp, in the car - it would be superb!

@puff has a build in his fork you can download. You'll need to enable Dev mode for Android auto by tapping on build number a bunch and going to dev options to check allow apps from unknown sources.

bingobob commented 8 months ago

Thanks for that,

Will try.

On Thu, 19 Oct 2023, 11:15 Sean Greenawalt, @.***> wrote:

Noob question. Is there a build with android auto available and can I get a link to it please? More than happy to test in my car! Would be brilliant, love finamp, in the car - it would be superb!

@puff https://github.com/puff has a build in his fork you can download. You'll need to enable Dev mode for Android auto by tapping on build number a bunch and going to dev options to check allow apps from unknown sources.

— Reply to this email directly, view it on GitHub https://github.com/jmshrv/finamp/issues/24#issuecomment-1770505632, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFKFUPC5IKUWQEJ6QNWKTLYAD4URAVCNFSM425G5FBKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGA2TANJWGMZA . You are receiving this because you commented.Message ID: @.***>

puff commented 8 months ago

Testing this build out, does it work well with offline support? I turned the app on offline mode after downloading songs and it seems that the lists still try to download on the car display. Unfortunately, at my work parking lot the signals are so bad that I can't get the music started.

Hi, unfortunately there is no offline support in my fork for Android Auto yet. You should be able to play music offline through your phone and have it play through your car, but playing through Android Auto's UI will go online.

Titaniumtown commented 5 months ago

Would love to see this worked on!

pshirshov commented 5 months ago

The fork seems to be working great, is there any chance it can be upstreamed?

Chaphasilor commented 5 months ago

We could probably included it with the redesign beta if the basics are working, to get some feedback and have more people test it out.

@puff would you mind opening a PR against the redesign branch and fixing the merge conflicts? It shouldn't be too much work hopefully since I recently merged main into it.

Chaphasilor commented 2 weeks ago

Android Auto is now supported with beta 0.9.8 when installed via the Play Store.
It seems like Carplay won't be easy to add any time soon. I can't work on that anyway, since I don't have a mac...