Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Podcasts start over instead of resuming only while on bluetooth.

  1. #11
    Junior Member
    Join Date
    Jun 2012
    Posts
    19
    @juwlz Yes I understand why the Play works as it is doing now. I was only requested a "hacked" Play action for use only from Tasker to bypass this OP2 bug for the time being.

    As suggested, I have sent you the android and beyondpod logs via email from the BP Advanced Settings.

    I also recorded the logcat logs yesterday night using Logcat Extreme app. Here is a log of ~8 seconds during which I start my car, its bluetooth gets connected to the phone and a podcast in BeyondPod restarts from the beginning even when it is originally paused somewhere in the middle: https://gist.github.com/kaushalmodi/...2f474e95cfa418

    Here's more interesting info:

    - Using Tasker (as I mentioned earlier), I force BeyondPod to not start playing as soon as I start my car.
    - When I see in the BeyondPod app, the progress bar has still not moved to the beginning of the podcast.
    - I even moved the progress bar elsewhere thinking that my manual change in progress bar will set the resume point as that new point I set manually.
    - But no! When I hit Play in the app, the podcast still restarts from the very beginning.

    Here are few more ideas which you could probably incorporate for Tasker integration:
    - Ability for Tasker to "see" at what position the podcast is at (so that I can manually save that to a variable when Tasker detects that I paused the podcast. I can then conditionally save that position ONLY if it is non-zero).
    - Ability for Tasker to set the resume positon (so that I can make BP resume only from a non-zero position).

  2. #12
    BeyondPod Team
    Join Date
    Feb 2012
    Posts
    1,033
    jazzboyrules,

    Thank you for the log. From what I can tell, the issue has to do with the Android Media Player implementation on the device. Seems like it for some reason it decides to start from the beginning even if it is seek-ed at the correct position (see the log and notes below). BeyondPod relies on the Android Media Player for all the playback and sound routing - e.g. we just load the episode seek it to the correct location and let the player play and route the audio to the appropriate place.

    One thing you can try is to enable playback speed support in BeyondPod - either tap on the "1x" icon on the player screen or "Enable Speed Adjustment" in BeyondPod's player settings.
    When playback speed is enabled, we use slightly different audio path that may work better on your device (we use the same codecs, but control them at slightly lower level that may "bypass" the problem area in the player). Once playback is enabled (try it over the speaker to see that you can actually play at faster speed) then try it over Bluetooth and see if that works better.

    Stefan

    -----------------
    FYI - here are the important lines from the log with explanation what is going on:

    ----Loading the episode and seeking to the last known played position position e.g. 1116 s. (out of 2836s.)
    10-05 12:46:07.688 V/BeyondPod(20458): Created Android MediaPlayer (0 ms. since last trace) [MediaPlayerAndroid]
    10-05 12:46:07.689 E/MediaPlayer-JNI(20458): QCMediaPlayer mediaplayer NOT present
    10-05 12:46:07.690 V/BeyondPod(20458): MultiPlayer Initialized! (2 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:07.695 V/BeyondPod(20458): Preparing playback source Sync! (Track: 1505150: Best of Not My Job (47:16/18:36), Playback Speed: 1.0) (5 ms. since last trace) 10-05 12:46:07.795 E/MediaPlayer(20458): Should have subtitle controller already set
    ...
    10-05 12:46:07.799 V/BeyondPod(20458): Scrobbling track: 1505150: Best of Not My Job paused (1116/2836) (2 ms. since last trace) [TrackMetadataPublisher]
    ....
    10-05 12:46:08.015 V/BeyondPod(20458): Playback prepared! Must seek to:1116000, Start Playback:false (1 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:08.015 V/BeyondPod(20458): Media Player Seeking to:1116000 (0 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:08.059 V/BeyondPod(20458): Seek Complete! (44 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:08.060 V/BeyondPod(20458): Currently at position: 1116000 (supposed to be at: 1116000) (1 ms. since last trace) [MediaPlaybackService]
    ....
    ----At this point BeyondPod has loaded the episode in the player and seeked to the correct position e.g. 1116 s. (out of 2836s.)
    ....
    ---- Here BeyondPod receives a stop/pause command from Bluetooth
    10-05 12:46:25.147 V/BeyondPod(20458): ****** Media button receiver got event: android.intent.action.MEDIA_BUTTON (17.08 s. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:25.148 V/BeyondPod(20458): ****** Media button event FLAGS: 0 (0 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:25.148 V/BeyondPod(20458): *** Media Button KEY => MEDIA_STOP 0 (1 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:25.148 V/BeyondPod(20458): ***========> Media button receiver executing action: pause (0 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:25.149 V/BeyondPod(20458): Service autoshutdown scheduled from onStart (1 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:25.149 V/BeyondPod(20458): *** PlaybackService received Command: pause, Option: null (0 ms. since last trace) [MediaPlaybackService]

    ---- Here BeyondPod receives a play/resume command and starts playback
    10-05 12:46:25.789 V/BeyondPod(20458): *** BPMediaSession command Play (640 ms. since last trace) [RemoteControlLP]
    10-05 12:46:25.791 V/BeyondPod(20458): Service autoshutdown scheduled from onStart (2 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:25.791 V/BeyondPod(20458): *** PlaybackService received Command: resume, Option: null (0 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:25.794 V/BeyondPod(20458): **** Requesting Audiofocus... . Requested:true (3 ms. since last trace) [AudioFocusHelper]
    10-05 12:46:25.794 V/BeyondPod(20458): Setting volume boost to: 0.0 (0 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:25.798 V/BeyondPod(20458): *** Player Started! (4 ms. since last trace) [MediaPlaybackService]

    --- Here BeyondPod still thinks it is at the correct position 1116/2836 (as reported by the player)
    10-05 12:46:25.803 V/BeyondPod(20458): Scrobbling track: 1505150: Best of Not My Job playing (1116/2836) (5 ms. since last trace) [TrackMetadataPublisher]
    ....
    10-05 12:46:26.050 V/BeyondPod(20458): ****** Media button receiver got event: android.intent.action.MEDIA_BUTTON (247 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:26.050 V/BeyondPod(20458): ****** Media button event FLAGS: 0 (0 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:26.050 V/BeyondPod(20458): *** Media Button KEY => MEDIA_STOP 0 (0 ms. since last trace) [MediaButtonIntentReceiver]
    --- Receiving Pause - My guess is that at just before that point Android player on the device gets confused and restarts from the beginning. So the next reported position 0 (e.g. 0/2836)
    .....
    10-05 12:46:27.010 V/BeyondPod(20458): ***========> Media button receiver executing action: pause (0 ms. since last trace) [MediaButtonIntentReceiver]
    10-05 12:46:27.012 V/BeyondPod(20458): Service autoshutdown scheduled from onStart (2 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:27.012 V/BeyondPod(20458): *** PlaybackService received Command: pause, Option: null (0 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:27.016 V/BeyondPod(20458): *** Player Paused! (4 ms. since last trace) [MediaPlaybackService]
    10-05 12:46:27.031 V/BeyondPod(20458): Scrobbling track: 1505150: Best of Not My Job paused (0/2836) (15 ms. since last trace) [TrackMetadataPublisher]

  3. #13
    Junior Member
    Join Date
    Jun 2012
    Posts
    19
    Enabling Speed Adjustments worked!

    Just a note related to that here:
    When I switched from Oneplus One to Oneplus Two, I copied over my BeyondPod settings too. So I already had the checkmark in front of "BeyondPod Settings > Player Settings > Enable Speed Adjustment". But apparently that setting was not yet effective. Then when I clicked on "1x" for the currently playing podcast, I got that warning message along the lines that enabling the speed adjustment was a beta feature and if I really wanted to enable that. Only after I agreed to that, the speed adjustment actually got enabled.

    So in summary, restoring beyondpod settings backup did not restore the enabled state of speed adjustment even though I saw it enabled in the settings (false positive).

    Thank you for this suggestion. I always had the speed adjustment enabled ever since that feature was introduced. So I do not know if that masked this issue on Oneplus One.

    In closing, all's good now Who do you think is responsible for fixing Android Media Player implementation? Is it the Oneplus OxygenOS team? Or is it a carry-over from the base Android OS?

  4. #14
    Junior Member
    Join Date
    Jun 2012
    Posts
    19
    An addition to my previous reply:

    While I was checking the consistency of the above solution, only once it happened that the bluetooth was connected to the car but the audio was playing out of the phone speakers. I had no way of controlling the audio output channel from BeyondPod. I kept on hitting pause/play but the audio will still come out of the phone (even while the car console said that the media was connected via bluetooth, and the phone of course showed that the bluetooth was connected to the car).

    It would be nice to have a manual override of the audio-channel out.. what if I connected headphones while bluetooth was connected? In that case, it would be helpful to be able to pick the output channel: phone speakers/aux out/bluetooth.

    The only "fix" for above was to turn off the car and restart, and then the audio started coming out of bluetooth.

    If I am able to reproduce this issue consistently, I will provide its log in a different thread. But I just wanted to let this out here as I found this problem while trying out the solution in this thread.
    Last edited by jazzboyrules; 10-07-2015 at 08:32 AM.

  5. #15
    BeyondPod Team
    Join Date
    Mar 2012
    Location
    UK (BP Team member from Jun 2012 to Mar 2017), http://blog.juwlz.co.uk/
    Posts
    4,169
    Quote Originally Posted by jazzboyrules View Post
    Enabling Speed Adjustments worked!

    Just a note related to that here:
    When I switched from Oneplus One to Oneplus Two, I copied over my BeyondPod settings too. So I already had the checkmark in front of "BeyondPod Settings > Player Settings > Enable Speed Adjustment". But apparently that setting was not yet effective. Then when I clicked on "1x" for the currently playing podcast, I got that warning message along the lines that enabling the speed adjustment was a beta feature and if I really wanted to enable that. Only after I agreed to that, the speed adjustment actually got enabled.
    Noted. Thanks for the feedback.

    In closing, all's good now Who do you think is responsible for fixing Android Media Player implementation? Is it the Oneplus OxygenOS team? Or is it a carry-over from the base Android OS?
    Since it doesn't happen on other devices (e.g. my own Xperia Z3c, which I use almost exclusively connected to my car's bluetooth), I'd say the Oneplus OxygenOS team.

    Julie

  6. #16
    BeyondPod Team
    Join Date
    Mar 2012
    Location
    UK (BP Team member from Jun 2012 to Mar 2017), http://blog.juwlz.co.uk/
    Posts
    4,169
    Quote Originally Posted by jazzboyrules View Post
    It would be nice to have a manual override of the audio-channel out.. what if I connected headphones while bluetooth was connected? In that case, it would be helpful to be able to pick the output channel: phone speakers/aux out/bluetooth.

    The only "fix" for above was to turn off the car and restart, and then the audio started coming out of bluetooth.
    Bluetooth is a bit of a nightmare on Android. Once things have got out of sync, doing things "nicely" just doesn't work. (In other words, fiddling with stuff to do with the audio output typically only works when it's working properly anyway, in which case there's no need for it.)

    My workaround for occasional bluetooth connection glitches is to have a shortcut to the System Bluetooth settings on my home screen, and to disconnect from the errant piece of bluetooth equipment, and then reconnect.

    Julie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •