wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
470 stars 259 forks source link

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

Open Perdellian opened 3 years ago

Perdellian commented 3 years ago

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

Desired behaviour

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

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)

di72nn commented 3 years ago

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.

RayBB commented 3 years ago

@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.

Perdellian commented 3 years ago

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 commented 3 years ago

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.