vfsfitvnm / ViMusic

An Android application for streaming music from YouTube Music.
GNU General Public License v3.0
8.26k stars 700 forks source link

Android Auto #47

Closed zachvlat closed 1 year ago

zachvlat commented 2 years ago

Feature description

If this app gets Android auto compatibility, it will effectively kill my Spotify app. So, don't do it please! 😝

Why do you want this feature?

Many of us listen music when driving and Android Auto helps a lot in this matter

Additional information

No response

vfsfitvnm commented 2 years ago

Unfortunately I never used Android Audio and I can't install it, so I'll leave this to contributors.

zachvlat commented 2 years ago

Also I 've never tried this before! I 'll try to fork it and see if I figure something out.

zachvlat commented 2 years ago

I closed it by accident!

zachvlat commented 2 years ago

In case it helps someone, I have another app that only shows up on Android Auto if you enable developer settings in Android Auto. I haven't tried with this app, and I sorta doubt it will work without further integration somehow (but I'm not a dev so I don't know).

Steps are:

  • Launch the Android Auto app
  • Tap the top left menu and select About.
  • Tap About Android Auto 10 times to unlock Developer Mode.
  • Select top right menu and check if there's Developer settings.
  • Select Developer settings and scroll down to Unknown sources and enable

I know but this doesn't work on this app. You must at least enable it from the xml files.

nonetrix commented 1 year ago

You can emulate Android auto with DHU might make it easier for people that don't own a car with it

Although looks like a pain to setup I don't know why it isn't just in the Android Studio emulator that can emulate a phone or a tablet or watch even I think

https://developer.android.com/training/cars/testing#test-auto

Off topic but this might also be interesting if you made your own DIY Android auto using this :P

sriio commented 1 year ago

I will take a look to support Android Auto (already did it for newpipe)

sriio commented 1 year ago

Some progress :blush:

Capture d’écran du 2022-09-16 14-29-29

Capture d’écran du 2022-09-16 14-29-40

Capture d’écran du 2022-09-16 14-29-45

zachvlat commented 1 year ago

I already build it to test it in my car, I 'll be back with more info! :D

sriio commented 1 year ago

I already build it to test it in my car, I 'll be back with more info! :D

It's not finished, it lacks the datasource and some adjustments (icon, cover, check enqueue, etc...) but all feedbacks is welcome. I'll do a build when this is all done

zachvlat commented 1 year ago

signal-2022-09-16-20-01-46-529 Unfortunately it didn't work. I enabled developer settings and unknown sources just in case but nothing. Should I do something else? Maybe mess with the Application mode?

sriio commented 1 year ago

signal-2022-09-16-20-01-46-529 Unfortunately it didn't work. I enabled developer settings and unknown sources just in case but nothing. Should I do something else? Maybe mess with the Application mode?

Hmm no, that's what I did to get access to the application. Have you tried restarting your phone? Sometimes non-gstore apps disappear, but restarting is enough to restore them. Otherwise, I don't see why... 😕

zachvlat commented 1 year ago

Screenshot_20220919-130810_Trebuchet I 'm gonna try it again later in the evening, but it worries me that I don't have the option to put it with the rest of the apps... Maybe someone other can test it again, with his car, when you have an apk to give. EDIT: I didn't managed to make it work yet!

sriio commented 1 year ago

Working implementation for test available here : https://github.com/sriio/ViMusic/releases/tag/test1.

You can play a playlist or a specific song (favorite). What it miss atm :

zachvlat commented 1 year ago

Screenshot_20220922-182052_Package installer I guess it's time to ditch it then! It works for the small amount of time I used it in my car, I 'll use it more extensively tomorrow (in more of a real life situation) and come back with any bugs/weird stuff I 'll found! Thank you!

SPOILER ALERT: i did press OK

sriio commented 1 year ago

New build here : https://github.com/sriio/ViMusic/releases/tag/test2.

Added :

Missing :

sriio commented 1 year ago

Last build available here : https://github.com/sriio/ViMusic/releases/tag/lastest

Added :

This is my last build, I won't have enough time to continue working on it.

zachvlat commented 1 year ago

Last build available here : https://github.com/sriio/ViMusic/releases/tag/lastest

Added :

  • Implement queue in MediaSession and seek on it
  • Add cover in view (to not break anything and display it, you need to enable "Show song cover" in settings)

This is my last build, I won't have enough time to continue working on it.

Good job! So far it works as intended. I really hope it gets merged, so other people can get it. (not many people follow github forks)

vfsfitvnm commented 1 year ago

I merged his work to the androidauto branch: https://github.com/vfsfitvnm/ViMusic/tree/androidauto. Here you can find the apks: https://github.com/vfsfitvnm/ViMusic/actions?query=branch%3Aandroidauto

vfsfitvnm commented 1 year ago

I'm currently using the android auto app with desktop head unit (DHU) from my pc. Vimusic works well so far! The android auto support is gonna make it soon :) Thank you @sriio!

vfsfitvnm commented 1 year ago

Merged to master. @zachvlat I'm not an android auto user so I don't know if what I changed is fine, but would you take a look to see if it's ok feature-wise?

vfsfitvnm commented 1 year ago

Forgot to mention the "Android auto" feature is disabled by default - you need to enable it in Settings > Other

zachvlat commented 1 year ago

ok I m gonna check it out and come back with some feedback!

zachvlat commented 1 year ago

it works. I build from source the latest master branch.

vfsfitvnm commented 1 year ago

Perfect. Closing as completed - let me know if you have further considerations!

mafrailea commented 1 year ago

@vfsfitvnm, just a comment, it wasn't initially working for me until I enabled "Unknown sources" in the Developer Settings of Android Auto.

Not sure if it's the way it's intended to work but, if so, it would make sense to inform the user in some way.

Or, even better, invoke the "Developer settings" dialog of Android Auto and urge the user to manually enable "Unknown Sources" there.

vfsfitvnm commented 1 year ago

Yep, it must be enabled in the android auto settings.

Or, even better, invoke the "Developer settings" dialog of Android Auto and urge the user to manually enable "Unknown Sources" there.

I can't do this, I'll just add a red text instead. Thanks for the idea!

Toiletmason commented 1 year ago

Anyone having an issue with the album art not showing?

vfsfitvnm commented 1 year ago

@Fatcakes https://github.com/vfsfitvnm/ViMusic/issues/47#issuecomment-1265388281