For the last couple of months, listening to podcasts has turned into a headache. The problem was a constant, and unpredictable pause of my shows. While listening on Bluetooth to an episode, all would be going well and suddenly it would stop.
I did the normal troubleshooting, like make sure:
- The app as not “battery optimized”
- It could run in the background
- Uninstall/Reinstall
- Try a new app
- Restart the phone
- Try different Bluetooth headphones
- Etc, etc
Nothing worked. Restarting the phone, or reinstalling the app helped to extend the frequency of the pauses, but they didn’t eliminate them.
This lead me to digging deep into the Android logs to see what was going on. I followed the steps described on a One Plus 6 phone, running Android 9.
The first step is to gain access to logging. To do that you need to have developer options enabled.
- Go to settings
- Scroll to the bottom and click on “About Phone”
- Tap on the “Build Number” box several times repeatedly until you get a message that says “You are a developer”
As a developer you’ll get a new option in Settings –> System –> Developer Options. To get the logs navigate to Developer options and tap on “Get Logs”. Under “Get Logs” you’ll have various options, I recommend the following:
- Tap delete history log
- Advanced –> Clear cache
This way you’ll end up with an easier-to-parse log. Now click on “save log”. This will require a phone restart. Once the phone has restarted, you are logging.
Now you need to reproduce the issue. For me, it was fire-up my podcast app, get on Bluetooth and wait for the pause.
As I anticipated, within 30 minutes of play time the app stopped. It is important that you know exactly when the issue happened. The logs will include EVERYTHING that happened in the system. This means that in the span of 1 second you could end up with 100+ events. One way to approximate when the issue happened is to count the seconds to the next minute. This way you can simply deduct that and get an approximate time. For example, if the pause happened at now, I’d look at my phone’s clock (11:23) and start counting seconds. When the time changed to 11:24 I stop counting and deduct those seconds from 11:24:00. It’s not perfect, but it will get you to the vicinity.
Now that you have an approximate timestamp, you need to view the logs. To view the logs go to Settings –> System –> Developer Options –> Get Logs –> Pack Log and Share. This will gather all of the logs and zip them up.
Once you have access to the logs, unzip them and look under the android.log file. As I noted before, it will be huge, but since you approximated the time, you can just seek to it. Now, the fun part begins.
The first thing I did was to search for the podcast app. Right around my approximate timestamp, I saw this MediaPlaybackService received Command: pause. That simply confirmed it was happening, but why?
Then I noticed a bunch of android.bluetooth.device.action.ACL_DISCONNECTED events right before the pause event. When I searched just for android.bluetooth.device.action I noticed it could be in multiple states, connected and disconnected. Before the first disconnected event there were some errors. Those errors were the culprit. The culprit turned out to be my fitbit which also runs on Bluetooth.
When the fitbit error’d out, it would generate the ACL_DISCONNECTED event. This event would then trigger the pause on the player. To confirm this I uninstalled the fitbit app and removed the fitbit device from Bluetooth and voila… Fixed. Pure and uninterrupted podcast gibberish 🙂
I hope this helps you in your troubleshooting adventures.
PS. The issue continues with the latest fitbit (Alta) firmware, and fitbit app. To work around this I have disabled “All Day Sync” and I force-stop the fitbit app. This means that nightly I have to manually sync it. A small price to pay for some sanity.