Skip to content
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

Inconsistent autoplay behavior when connected to Android Auto #6698

Closed
3 tasks done
davidjoliver86 opened this issue Oct 12, 2023 · 35 comments · Fixed by #6816 or #7156
Closed
3 tasks done

Inconsistent autoplay behavior when connected to Android Auto #6698

davidjoliver86 opened this issue Oct 12, 2023 · 35 comments · Fixed by #6816 or #7156
Labels
Functionality: Interacting devices Anything related to Android Auto, smart watches & smart speakers Type: Confirmed bug Bugs confirmed by a lead developer

Comments

@davidjoliver86
Copy link

Checklist

  • I have used the search function for open and closed issues to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.
  • If the bug only to occurs with a certain podcast, I will include the URL of that podcast.

App version

3.1.1 (8073de5)

Where did you get the app from

Google Play

Android version

13

Device model

Pixel 7 Pro

First occurred

Since using the app

Steps to reproduce

This is difficult to reliably reproduce because it seems that it does this randomly and inconsistently, and I haven't figured out any sort of pattern to reproduce this.

Most of the time, the intended behavior would be to simply resume my podcast in progress upon connecting to Android Auto. I already have AA setup to resume my media on connect. I would say about 80-90% of the time this is the observed behavior.

I'm currently finding replacements for the soon-to-be-deprecated Google Podcasts app. This would pretty much be perfect if not for this bug. I will say that in the duration I've been using the app, I've always had at least something queued up, so the queue has never been empty.

Expected behaviour

Expected it to always autoplay upon connecting to Android Auto.

Current behaviour

What happens about 10-20% of the time is that it won't autoplay anything. The split-screen view will show 'For You', then I swipe that to view the AntennaPod session, and it says I have to tap to open it. At that point, I still have to go to the Queue tab and manually tap the topmost episode to continue playback.

Logs

Next time I observe this happening, I will export logs and paste them.

@davidjoliver86 davidjoliver86 added the Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet label Oct 12, 2023
@davidjoliver86
Copy link
Author

I doubt there's that much in the logs but here they are:

--------- beginning of main
10-11 18:13:25.118 21429 21429 D PlaybackService: OnLoadChildren: parentMediaId=Queue
10-11 18:13:25.118 21429 31131 D DBReader: getQueue() called
10-11 18:13:25.118 21429 31131 D DBReader: getQueue()
10-11 18:13:25.119 21429 31131 D DBReader: getFavoriteIDList() called
10-11 18:13:25.119 21429 31131 D DBReader: getQueueIDList() called
10-11 18:13:25.119 21429 31131 D DBReader: Extracting Feedlist
10-11 18:13:25.126 21429 21429 D PlaybackService: OnLoadChildren: parentMediaId=Downloads
10-11 18:13:25.126 21429 31142 D DBReader: getRecentlyPublishedEpisodes() called with: offset=0, limit=100
10-11 18:13:25.127 21429 31142 D DBReader: getFavoriteIDList() called
10-11 18:13:25.127 21429 31142 D DBReader: getQueueIDList() called
10-11 18:13:25.127 21429 31142 D DBReader: Extracting Feedlist
10-11 18:13:32.717 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:13:49.793 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:13:59.216 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:07.833 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:21.336 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:27.034 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:33.819 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:37.660 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:43.155 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:44.616 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:14:52.201 21429 21429 D TrafficStats: tagSocket(72) with statsTag=0xffffffff, statsUid=-1
10-11 18:15:00.148 21429 21429 D TrafficStats: tagSocket(116) with statsTag=0xffffffff, statsUid=-1
10-11 18:15:01.381 21429 21429 D UserPreferences: User data folder not writable or not set. Trying default.
10-11 18:15:01.382 21429 21429 D BugReportActivity: No crash report recorded
10-11 18:15:01.908 21429 21456 D OpenGLRenderer: endAllActiveAnimators on 0xb4000079b10b1d40 (RippleDrawable) with handle 0xb4000078c0df6ad0
10-11 18:15:06.308 21429 21429 D TrafficStats: tagSocket(100) with statsTag=0xffffffff, statsUid=-1
10-11 18:15:06.816 21429 21456 D OpenGLRenderer: endAllActiveAnimators on 0xb4000079b0f4c250 (MenuPopupWindow$MenuDropDownListView) with handle 0xb4000078c0ddc1c0
10-11 18:15:10.495 21429 21429 D UserPreferences: User data folder not writable or not set. Trying default.
10-11 18:15:10.518 21429 21456 D OpenGLRenderer: endAllActiveAnimators on 0xb4000079b0fd68d0 (RippleDrawable) with handle 0xb4000078c0defd50

@davidjoliver86
Copy link
Author

Upon further testing, I noticed that:

  • If my car audio was last set to Android Auto - plugging my phone in will immediately start playing AntennaPod (assuming that was my last media app), and will continue off in my queue exactly where I left off. This is expected and desired.
  • If my car audio was not Android Auto - e.g. the radio - then I have to go through the "tap to open" and manually select my highest queue item to play. Keep in mind before this happens, the radio is still playing, which is expected.

With Google Podcasts in the below scenario, it would be ready to go with the player already open, set to resume my queue, and it was only awaiting me to manually tap play. Here, there's the extra step of tapping back into the app, then tapping the top of my queue to resume.

So it's a relatively minor setback in user workflow, and I'm partially willing to bet that it's because Google Podcasts was somehow more "integrated" with my phone (Pixel 7 Pro) than AntennaPod is.

I would then just hope that AntennaPod knows by default to resume playback from the top of the queue without the extra intermediary manual step, but it's honestly a very minor issue in an otherwise excellent app.

@tonytamsf
Copy link
Member

tonytamsf commented Nov 9, 2023

I can confirm that this is annoying 'bug' in Android Auto since I use AP frequently in my car and many others have chimed in https://forum.antennapod.org/t/android-auto-not-continuing-playback/3108?u=tonytamsf

@antennapod-bot
Copy link

This issue has been mentioned on AntennaPod Forum. There might be relevant details there:

https://forum.antennapod.org/t/android-auto-not-continuing-playback/3108/8

@tonytamsf tonytamsf added Type: Confirmed bug Bugs confirmed by a lead developer Functionality: Interacting devices Anything related to Android Auto, smart watches & smart speakers and removed Type: Possible bug Issues that seem to be a bug, but haven't been confirmed yet labels Nov 9, 2023
@tonytamsf tonytamsf self-assigned this Nov 13, 2023
This was referenced Nov 16, 2023
@tonytamsf
Copy link
Member

Is anyone willing to test out a debug build that should address this bug

The apk is in the Checks tab here Android auto resume by tonytamsf · Pull Request #6766 · AntennaPod/AntennaPod · GitHub

download it from https://github.com/AntennaPod/AntennaPod/suites/18235922573/artifacts/1053611078

@fakerli
Copy link

fakerli commented Nov 20, 2023

Is anyone willing to test out a debug build that should address this bug

The apk is in the Checks tab here Android auto resume by tonytamsf · Pull Request #6766 · AntennaPod/AntennaPod · GitHub

download it from https://github.com/AntennaPod/AntennaPod/suites/18235922573/artifacts/1053611078

Apk is no longer available.

@jpriebe
Copy link

jpriebe commented Nov 20, 2023

I see this same behavior, but it is not inconsistent -- it is 100% consistent. Every single time I use Antenna pod with Android Auto, I get the "for you" view, and nothing is playing. Even if I was JUST playing a podcast on that vehicle, turned off the car (e.g. to refuel), and restarted the vehicle without ever disconnecting the USB cable to my phone.

I'd be happy to test a debug build.

@fakerli
Copy link

fakerli commented Nov 20, 2023

I see this same behavior, but it is not inconsistent -- it is 100% consistent. Every single time I use Antenna pod with Android Auto, I get the "for you" view, and nothing is playing. Even if I was JUST playing a podcast on that vehicle, turned off the car (e.g. to refuel), and restarted the vehicle without ever disconnecting the USB cable to my phone.

I'd be happy to test a debug build.

There is an apk to test in this pull request:
#6766

@jpriebe
Copy link

jpriebe commented Nov 20, 2023

There is an apk to test in this pull request: #6766

@fakerli - have you been able to use this APK in android auto? I installed it to my phone, and of course, I then had two AntennaPod apps installed. The android auto "customize launcher" only showed one, so I uninstalled my original play store AntennaPod, thinking maybe the customize tool didn't like two apps with the same name (although this debug APK does have "Debug" on the end of the name). Now the customize launcher doesn't allow me to select AntennaPod. I tried rebooting just in case, but still can't select AntennaPod for the AA launcher. Is there something I need to do so I can add it to the launcher?

@fakerli
Copy link

fakerli commented Nov 20, 2023

@jpriebe My wife has my car at the moment. I'll get it back in about 24 hours :-D Will check then!

@bartlibert
Copy link

I can see it in the customization settings, but I have unknown sources enabled in AA developer settings. Try if this helps:

  1. Go to android auto settings
  2. Tap "version" 10 times
  3. Read the warning and enable developer settings
  4. Press the 3 dots in the top right corner
  5. Select "developer settings"
  6. Select "unknown sources".

Check if it works. Maybe you need to reinstall the apk.

Note: I'm on a Dutch system, so names of options might not be exact, but you should be able to find them.
Note 2: it's night over here, so I'll test it in the morning

@jpriebe
Copy link

jpriebe commented Nov 20, 2023

I can see it in the customization settings, but I have unknown sources enabled in AA developer settings. Try if this helps:

Ahhh, developer mode -- that makes sense. AA has its own safety mechanism to prevent sideloading. Your steps worked perfectly.

After I turned on unknown sources, I did have to uninstall and reinstall the apk for the launcher customizer to show the AntennaPod Debug application.

Thanks for such a useful comment! Now to drive around with the new build and see what happens.

@jdrewsteiner
Copy link

I got the debug APK to show up in Android Auto, but it gives me an error when trying to open it.

@bartlibert
Copy link

I did some tests with the debug APK and this is what I see:
When android auto starts, the last played podcast always starts playing automatically, at the position it left of before. So this is good.
However, the Android Auto setting that controls if music playing should be resumed automatically, is ignored completely. Even if this is set to off, the podcast starts playing.
In other apps, if this setting is of, the last track is loaded, but paused. This way, you only have to press "play" to start it. It would be nice if AntennaPod would respect this setting.

@jpriebe
Copy link

jpriebe commented Nov 22, 2023

Same experience. To be transparent, I've only tested 2 times since getting the debug apk installed, so take that for what it's worth.

I started the day by listening to a podcast on AntennaPod on my phone's speaker in the house. I stopped the playback before leaving the house to get in the car. I connected the phone to the car, and it immediately resumed playback (a little unexpected, but still better than showing the "for you" screen).

After work, I connected the phone to the car again, and the playback started up again automatically.

This is an improvement, but I think it should honor the Android Auto setting for auto resume.

@jpriebe
Copy link

jpriebe commented Dec 4, 2023

For the most part, my experience over a week or so with the debug build was pretty good. Like I mentioned in my previous comment, it was not honoring the "Start music automatically" setting in Android Auto. But auto playing is preferable to starting on the "For You" page and requiring a bunch of navigation to the episodes list to find your episode.

I saw that https://github.com/AntennaPod/AntennaPod/pull/6766/files was closed. Sounds like more investigation is required. I hope that a fix will come soon. The debug build doesn't seem to auto-download episodes (regardless of settings), so I'm back to the Play store version.

@tonytamsf
Copy link
Member

Thanks folks for testing it. The PR fix I made was a bit hacky hence I closed it until I can figure out a better solution #6766

@tonytamsf
Copy link
Member

tonytamsf commented Dec 20, 2023

Thanks folks for testing it. The PR fix I made was a bit hacky hence I closed it until I can figure out a better solution #6766

My 2nd try to fix this issue #6816

To download the debug build, click on the Checks tab and download the Archives

@ByteHamster
Copy link
Member

What does this "for you" screen show? Where does it come from? I don't think AntennaPod generates such a screen. Does it show AntennaPod episodes?

@bartlibert
Copy link

bartlibert commented Dec 20, 2023

I don't know where the "for you" screen comes from, but it is shown on the Android Auto interface if you are using the "split screen" mode (don't know the official name).
For reference, take a look at this: PXL_20231220_154336115
In the picture frok my car, the right "window" shows the "for you" screen. This contains a variety of media, but it seems to be related to the last active media player. For example, if I played a lot of spotify music, it will contain spotify suggestions. If I used AntennaPod a lot, it will include episodes from podcasts I listen to in AntennaPod. Which episodes is still unclear to me, as it used to be a random mix from the queue and downloads, but nowadays, it's mostly all episodes from one specific podcast. Sometimes, there's also a mix of apps, so for example some music and some podcasts mixed together.

@tonytamsf
Copy link
Member

I think "for you" is part of Google Maps? https://www.reddit.com/r/PodcastAddict/s/rCCfsh25DW

@bartlibert
Copy link

Thanks folks for testing it. The PR fix I made was a bit hacky hence I closed it until I can figure out a better solution #6766

My 2nd try to fix this issue #6816

To download the debug build, click on the Checks tab and download the Archives

I tested this and the behavior of the "current" tab is as described.

@tonytamsf
Copy link
Member

@bartlibert Thanks for testing. Is it an acceptable fix for the issue?

@ByteHamster
Copy link
Member

Doesn't your fix still require users to open the app, navigate to the "current" screen, and press the song? This doesn't sound very different from going to the queue and pressing play. Does the additional screen make it harder to access other screens?

@tonytamsf
Copy link
Member

tonytamsf commented Dec 20, 2023

@ByteHamster The current problem with going to the queue is that if you are not playing the episode from the top of the queue, it is hard to scroll and find the previous episode.

I don't think this makes it harder to use the other screens.. but other test users can speak up. we can also move the current screen after Queue, Downloads

@bartlibert
Copy link

It is already a huge improvement indeed, especially if you don't always play from the top of the queue (as I do).
However, other apps have (IMHO) still better behaviour, but I don't know how easy it is to implement.
In the pictures, I use spotify as an example, but I've seen the same behaviour with i.e. Podcast Addict (which I used before I discovered AntennaPod).

If spotify was the last app used to play audio on android auto, it will behave in one of two ways:

  1. If android auto is in the "tiled" mode, it will show the last played/playing track instead of the "for you" screen, together with a "play" button:
    PXL_20231221_083644001

  2. If android auto is started with "fullscreen navigation", you will be able to start playing via the controls in the bottom of the screen.
    PXL_20231221_083730994

@tonytamsf
Copy link
Member

tonytamsf commented Dec 21, 2023

It is already a huge improvement indeed, especially if you don't always play from the top of the queue (as I do). However, other apps have (IMHO) still better behaviour, but I don't know how easy it is to implement. In the pictures, I use spotify as an example, but I've seen the same behaviour with i.e. Podcast Addict (which I used before I discovered AntennaPod).

Thank you @bartlibert for testing. I agree that my current quick fix is better than before, but I would rather have what Spotify is doing. I'll continue to look for a 'right' fix. I think my current quick fix is valuable to release until we can figure out the perfect fix since it's pretty painful right now.

See this recent review with 84 'likes' pointing out this issue

Screenshot 2023-12-21 at 5 51 26 AM

@bartlibert
Copy link

FYI, open source Ultrasonic app has the "correct" behavior, it might provide some inspiration: Gitlab

@keunes
Copy link
Member

keunes commented Jan 4, 2024

Users mentioning this in Google Play reviews:

1

I need this app for Android auto. In the app when I stop in the middle of a podcast in return, I can continue by pressing play. In Android Auto. I do not get that option. It does not retain the current podcast nor present the play button panel. It's great otherwise, but useless to Android auto users. I tried writing to support. I know it's the holidays, but I would have at least like an acknowledgment of the situation and did not get any response. If I get a solution I will change the review.

2

Ich dachte, die App kann Google Podcasts ersetzen, aber einige essenzielle Dinge funktionieren nicht. Wenn z.B. während des Hörens jemand anruft, egal ob ich ran gehe oder nicht. Der Podcast stoppt und ich muss ihn manuell wieder starten. Bei Android Auto ist es ähnlich. Man verlässt das Auto, steigt 10 Minuten später wieder ein, dann startet der Podcast zu 80 Prozent nicht von allein. Auch wird bei Android Auto nicht angezeigt, wann eine neue Folge erschienen ist.

3

Basic functions work well but for some reason this app refuses to resume playing automatically when connecting to Android Auto. You have to start app, go to queue, remember which podcast you were listening to and click it... Certainly some weird behavior

4

Macht was er soll, ein Stern Abzug weil ich nicht mehrere Geräte unkompliziert synchronisieren kann. Kein nahtloses Weiter hören über Android Auto möglich, sondern mühsames suchen.

5

Mediocre at best. I have been trying to find a replacement for Google Podcasts and have this a shot. Unfortunately AntennaPod falls short in a couple of key areas. It will occasionally just lose a downloaded file making me redownload a podcast. I would say this happens at least once a week. A bigger issue is that it does not integrate well with Android Auto and I have to manually go into AntennaPod and select what I want to listen to rather than just playing whatever I was last listening to.

6

The app itself is pretty good and definitely a contending alternative as Google Podcasts is being sunset. I've docked one last star because the AndroidAuto app is not a consistent experience. If you weren't listening to a podcast right before entering a car. It will not automatically resume in the vehicle. There's no "playing now" option either so you're left either searching for it through downloads or standard search or navigating back to the podcast itself. Quite frustrating.

7

Android Auto interface isn't great (hard to resume in progress podcasts), but best alternative to defunct Google Podcasts

8

This is a mostly fine replacement for Google Podcasts, except for a couple of very annoying things. 1. Not being able to download a single episode of a podcast without subscribing (and then being forced to listen to that episode before being able to unsubscribe). This has been requested as a feature for over 3 years with no fix. 2. Playback does not automatically resume the episode/location in Android Auto. You must open the app and navigate to the episode to resume.

@keunes
Copy link
Member

keunes commented Jan 4, 2024

@tonytamsf Given that your 'desired' solution (like Spotify) isn't implemented yet, should we reopen this issue?

@tonytamsf
Copy link
Member

@tonytamsf Given that your 'desired' solution (like Spotify) isn't implemented yet, should we reopen this issue?

I think this PR is the desired solution #6878

@antennapod-bot
Copy link

This issue has been mentioned on AntennaPod Forum. There might be relevant details there:

https://forum.antennapod.org/t/resume-podcast-between-drives-on-android-auto/3728/13

@hades
Copy link
Contributor

hades commented Apr 23, 2024

Currently there's some code in AntennaPod that attempts to resume playback automatically, but ideally this should be handled by Android Auto. It looks like AntennaPod doesn't fill out the MediaSessionCompat object correctly, which prevents Android Auto from restarting the playback automatically or presenting an option to the user to do so.

I'll investigate this further.

@tonytamsf
Copy link
Member

@hades Feel free to take on this issue from me since I hadn't made much progress

@tonytamsf tonytamsf removed their assignment Apr 23, 2024
@ByteHamster
Copy link
Member

Talking about MediaSession, we should probably update to androidx media3 MediaSessions. That seems to need quite a large number of non-trivial code changes, though. I tried it at some point and then gave up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality: Interacting devices Anything related to Android Auto, smart watches & smart speakers Type: Confirmed bug Bugs confirmed by a lead developer
Projects
None yet
10 participants