-
-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play and Show NowPlaying MediaItem when clicked on Android Auto #991
base: minor
Are you sure you want to change the base?
Play and Show NowPlaying MediaItem when clicked on Android Auto #991
Conversation
Should we have some state to check whether we are in Android Auto mode or not? |
Sure yes, we need to add a check to know if the client is Android Auto or
not.
…On Wed, 18 Jan 2023, 15:47 ryanheise, ***@***.***> wrote:
Should we have some state to check whether we are in Android Auto mode or
not?
—
Reply to this email directly, view it on GitHub
<#991 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFRE24OLBO5JXQKZAVCIALWS7Q6JANCNFSM6AAAAAAT7AZ7GE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I guess a more important question is why this override doesn't actually make a call to play the audio. |
Yaaa, tried to check on a couple of hacks suggested on stackoverflow and google auto docs , the package seems to have followed the pattern quite correctly. However skipping to the index of the items already added to the queue can be a workaround for now. Probably we can pass the client type on MediaItem extras ,so that its easer to combine the check for the index and client type before we skip to the item via Android Auto. |
Hello I have an app with radio stations list and work as well in iOS CarPlay but I don't know why in android auto I see just the app icon and when I open the app I dont see nothing. the screen is empty. how I can pass the mediaItem from flutter to display in a list in android auto and when I click on one item this go to play? |
Hi, please checkout this example from the library. It is pretty clear on how you can do it on Android Auto. |
@bensalcie ok thx, I try tomorrow and I'll tell you how it went. |
@bensalcie this works. thx. I need last help plz. do u know why if I have added my tracks on mediaItems why inside android auto I see blank screen? |
Get the extras flags from here |
Thanks @bensalcie, now the android auto app shows the list of my songs but how can I hide the time and the seek bar inside the "Now Playing" screen? Your previous example disable only the dot on the seek bar but don't hide it and the time too |
Hello do u know why if I connect the smartphone to the car radio, if I don't open the app before and open directly the android auto, this show me an empty list and then when I open the app stuck on launch screen? |
@federico2390 Make sure you architecture your Audio Service correctly so that your media items can be available to Android Auto even in the background. The cause could be that your media items depend on app performing some tasks on foreground before going to background. The example on Multiple Handlers can fetch the media items even when the app was closed and no longer running. |
@bensalcie Hi solved but remaining the problem that if I open first android auto inside the car and later I want to open the app, this stuck on launch screen. I'have read some your issue on git now but I haven't found solutions. Do u know have can I solve the problem? I have followed the readme file of the plug-in but I use mainactivity.it and not mainactivity.Java. Do u think that this is not the problem? I don't know how can do |
@federico2390 I think the problem is with the theme style used on Android (Portrait and Landscape restrictions). (Especially if you're using the native splash, you gotta check on that.) |
@bensalcie If i don't use audio handler will my audio be controllable from android auto? |
Yes, if you decide to use an Alternative Audio Management , still will work. As long as you conform to media architecture and the framework will assist you. |
Adding this snippet enables you to play MediaItems on Android Auto, and shows the correct Playing information on click.