ViMusic icon indicating copy to clipboard operation
ViMusic copied to clipboard

Android Auto

Open zachvlat opened this issue 3 years ago • 5 comments

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

zachvlat avatar Jun 16 '22 08:06 zachvlat

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

vfsfitvnm avatar Jun 16 '22 10:06 vfsfitvnm

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

zachvlat avatar Jun 16 '22 10:06 zachvlat

I closed it by accident!

zachvlat avatar Jun 16 '22 10:06 zachvlat

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

urmomsangus avatar Jun 17 '22 20:06 urmomsangus

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.

zachvlat avatar Jun 17 '22 21:06 zachvlat

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

nonetrix avatar Sep 01 '22 07:09 nonetrix

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

sriio avatar Sep 05 '22 09:09 sriio

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

sriio avatar Sep 16 '22 12:09 sriio

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

zachvlat avatar Sep 16 '22 13:09 zachvlat

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

sriio avatar Sep 16 '22 13:09 sriio

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?

zachvlat avatar Sep 16 '22 18:09 zachvlat

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... 😕

sriio avatar Sep 19 '22 09:09 sriio

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!

zachvlat avatar Sep 19 '22 10:09 zachvlat

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

Wait, does it work with Newpipe?

Here's an open issue which also has good info regarding trying to implement:

https://github.com/TeamNewPipe/NewPipe/issues/1758

urmomsangus avatar Sep 21 '22 13:09 urmomsangus

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 :

  • Random favorite songs
  • Recent songs
  • Cover
  • Icons
  • Enqueue list

sriio avatar Sep 22 '22 15:09 sriio

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

zachvlat avatar Sep 22 '22 15:09 zachvlat

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

Added :

  • Icon and thumbnail
  • Random play for favorite songs
  • Add recent songs (same as in homepage) + random play

Missing :

  • Cover (missing extra/flag maybe ?)
  • Enqueue list (not sure about it, queue are not in mediaSession but in player ...)
  • Clean/refacto then PR and review by @vfsfitvnm
  • Anything else ?

sriio avatar Sep 23 '22 09:09 sriio

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.

sriio avatar Oct 03 '22 12:10 sriio

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)

zachvlat avatar Oct 04 '22 12:10 zachvlat

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 avatar Oct 04 '22 13:10 vfsfitvnm

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 avatar Oct 10 '22 13:10 vfsfitvnm

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 avatar Oct 11 '22 10:10 vfsfitvnm

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

vfsfitvnm avatar Oct 11 '22 10:10 vfsfitvnm

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

zachvlat avatar Oct 11 '22 10:10 zachvlat

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

zachvlat avatar Oct 11 '22 15:10 zachvlat

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

vfsfitvnm avatar Oct 11 '22 16:10 vfsfitvnm

@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.

mafrailea avatar Oct 16 '22 19:10 mafrailea

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!

vfsfitvnm avatar Oct 16 '22 19:10 vfsfitvnm

Anyone having an issue with the album art not showing?

Toiletmason avatar Oct 24 '22 23:10 Toiletmason

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

vfsfitvnm avatar Oct 25 '22 06:10 vfsfitvnm