android-app icon indicating copy to clipboard operation
android-app copied to clipboard

Don't steal focus when text-to-speech (TTS) advances to next article

Open Perdellian opened this issue 3 years ago • 4 comments

Issue details

Whenever Wallabag's text-to-speech integration finishes reading one article and advances to the next, the app comes up on screen in place of whatever other application the user was interacting with at the time.

For an example of this being more than a minor nuisance, it's especially troublesome when Wallabag is running in the background for drive-time audiobook-style article catch-up (controlled via bluetooth to comply with hands-free laws) while a mapping/navigation app is fullscreen in the foreground with turn-by-turn directions. It is very possible to miss a turn because one can't get the GPS navigation app back up in time, all while trying not to crash as one crosses lanes over to the curb or exit …and the aging phone's app switcher is fiercely lagging.

Duplicate?

Didn't right off see other issue reports addressing this

Present behaviour

  • Text-to-speech finishes reading an article while Wallabag is in the background
  • Pageflip sound plays
  • Wallabag slides into the foreground, interrupting whatever else you're interacting with on the phone.
  • TTS continues reading the next article

Desired behaviour

  • Text-to-speech finishes reading an article while Wallabag is in the background
  • Pageflip sound plays
  • A notification (optionally?) announces the article/'track' change
  • TTS continues reading the next article

Steps to reproduce the issue

  1. Add multiple articles to Wallabag's unread queue
  2. Set text-to-speech playing any but the final article.
  3. Go to a different app while listening to the article
  4. Wait for TTS to finish reading the first article
  5. Fumble hurriedly to get back to whatever you were doing before the article change

Environment details

  • wallabag app version: 2.4.0 (226)
  • wallabag app installation source: F-Droid
  • Android OS version: 9
  • Android ROM: LineageOS 16.0-20200927-NIGHTLY-klte
  • Android hardware: Samsung Galaxy S5 / SM-G900T
  • wallabag server version: latest Docker image at time of writing.
  • Do you have Two-Factor-Authentication enabled?: no

Your experience with wallabag Android app

On the whole, vastly better than Pocket. Kudos on making the TTS controls actually usable while the article is visible and exposing seeking to bluetooth controls (and for putting seek buttons in the notification area so that my old Pebble Time's MusicBoss watchapp could figure it out even before the seek-not-skip option was added in 2.4)

Perdellian avatar Oct 12 '20 07:10 Perdellian

Thanks for bringing attention to the issue!

Unfortunately, current TTS implementation doesn't provide an easy way to fix this. I started working on it a while back (#976), but currently it is on hold.

You may try using the "split screen" feature of Android, maybe it'll help a bit.

di72nn avatar Oct 12 '20 10:10 di72nn

@Dhraakellian how do you make the app play the next article in queue when one finishes? I haven't been able to turn on this functionality. Would be great to have the playlist functionality.

RayBB avatar Jan 06 '21 08:01 RayBB

Tap the settings icon on the right-hand side of the TTS control bar Enable the setting indicated in this screenshot: Screenshot_wallabag_TTS_controls

Perdellian avatar Feb 01 '21 02:02 Perdellian

Current behavior now appears to be to not advance at all unless the Wallabag app has focus, which while suboptimal overall is still a massive improvement, in my opinion.

You may try using the "split screen" feature of Android, maybe it'll help a bit.

This appears to also be a work-around with the current behavior.

Perdellian avatar Feb 01 '21 02:02 Perdellian