Commit Graph

60 Commits

Author SHA1 Message Date
b4a6762bd6 Make Media Controls work better after battery eviction (#7141)
The patch allows to restart AntennaPod after being removed by the battery saver from the Media Control. It doesn't start the media, but restores the interface in Media Control to then to start playing.
2025-08-24 10:45:04 +02:00
77888a12cc Properly update widget state when stopped (#7938) 2025-08-23 20:51:29 +02:00
e539479f2c Upgrade dependencies (#7936) 2025-08-18 20:24:58 +02:00
cfd9e1f886 Fix playback position not saved after being changed, when episode is paused (#7911) 2025-08-04 08:39:00 +02:00
b9014b64e0 Android Auto: Grid view for subscriptions (#7889) 2025-07-20 16:42:09 +02:00
55d3b743d1 Rework sleep timer so it no longer uses threads and clean up PlaybackServiceTaskManager (#7713)
Reworked sleep timer to no longer use threads, instead uses PlaybackService PlaybackPositionEvent which is fired while media is playing. We use this to calculate how much time is left of the sleep timer and send the proper events.
2025-07-20 16:27:17 +02:00
c5cec07b0e Android Auto: Current tab icon and visibility fixes (#7888)
* Use same play state detection for tab visibility as content

* Add suitably-styled play icon for current tab
2025-07-20 10:45:40 +02:00
f489a07f16 Fix 'all episodes' on Android Auto not respecting filter (#7884) 2025-07-17 17:44:26 +02:00
b65062d18d Remove duplicate custom feed title in subtitle field (#7855) 2025-06-28 15:40:58 +02:00
c2f7dabc8b Add incompletely played episodes to playback history (#7815) 2025-05-27 22:52:43 +02:00
d95e03b51b Fix back stack being cleared after searching (#7757) 2025-04-13 22:20:42 +02:00
7c7863f2ea Fix crash in PlaybackService (#7751)
When service is quickly stopped again due to a playback error,
background tasks might not have delivered their result yet.
In this case, the service objects already get cleaned up.
Now, if the result gets delivered, the service is in an invalid state.
2025-04-12 00:12:00 +02:00
699b96b174 Added a small vibration when the phone is shaken to reset the sleep timer (#7714) 2025-04-05 16:04:26 +02:00
3ed5b0bfa4 Add option to automatically download queue (#7627)
We already added the queue to the auto-download candidates.
Now that auto-download was rewritten to not be a "master switch",
the code is called even if auto-download is turned off for all subscriptions.
This lead to queued episodes being downloaded for users who had auto-download disabled.

Convert the feature to an explicit setting to avoid behavior changes for users.
Also, this implements a setting to auto-download the queue,
which users have requested because they did not know that AntennaPod already does this.
Finally, it should solve user confusion where they automatically add episodes to the queue
but set the auto-download filter to ignore specific episodes.
2025-02-02 19:28:23 +01:00
cf99a0e07e Fix stop of local mediaSession immediately cancelling Cast playback (#7598) 2025-01-11 10:34:11 +01:00
e8b7c688bc Fix crash when intent is redelivered (#7599) 2025-01-05 17:57:00 +01:00
8285cafa63 Restore playback speed on Chromecast (#7562) 2024-12-16 23:13:26 +01:00
ae58f21218 Remove notification permission nag (#7489) 2024-11-10 11:46:10 +01:00
51f92e94eb New way to detect car mode to fix skip to next episode (#7442) 2024-11-02 09:58:55 +01:00
4a92a5e019 Make sync service interface more standard (#7479) 2024-10-30 21:30:29 +01:00
4f10efee7a Remove external files permission (#7407)
Android documentation:
> If your app is on a device that runs API level 19 or higher,
> you don't need to declare this permission to read and write files
> in your application-specific directories.

AntennaPod supports API 21+, so the permission is completely irrelevant.

Removing it to "clean up" our permissions list on F-Droid.
2024-09-14 11:19:15 +02:00
5ea92f68b1 Catch crash when device does not support LoudnessEnhancer properly (#7390) 2024-09-08 12:06:20 +02:00
ab4d05e7b5 Check if media player is null before accessing tracks (#7388) 2024-09-08 12:05:13 +02:00
936bfa029e Increase buffer duration (#7362)
When podcasts use dynamic ad insertion and the media file changes
between different network requests, users might experience jumps.
Now, try to basically download the whole episode as soon as one
hits the play button. That should avoid most of the jumps.
2024-08-30 18:11:26 +02:00
627d8ee83f Workaround of AudioEffect crashing on Lenovo tablets (#7309)
Android 14 on Lenovo tablets does not intialize this AudioEffect. Catch this exception and continue playback.
2024-08-01 22:06:49 +02:00
d7d783c63c Merge branch 'master' into develop 2024-07-27 19:22:28 +02:00
87355b528c Revert ExoPlayer back to default http backend (#7250)
Basically reverts 186de76d95
The OkHttp backend sometimes causes issues when servers cut the connection.
We had this happen after 1000s (about 17 minutes) for many users after upgrading OkHttp.
Removes proxy support for streaming.
2024-07-02 16:44:58 +02:00
c51656f8e7 Spotbugs cleanup part 2 (#7204) 2024-06-09 20:47:49 +02:00
0a768e6286 Merge branch 'master' into develop 2024-05-29 18:27:53 +02:00
84b6f442fc Fix android auto resume on reconnect issues (#7156)
Previously the MediaSession object created in PlaybackService in onCreate would
be completely empty. This seemed to confuse Android Auto, and prevented it from
restarting playback.

Filling the MediaSession object using the data from the player state at
onCreate resolves this problem.

This is documented in Android Auto docs[1], albeit indirectly and somewhat
confusingly.

Also move the setSessionToken call to the end of onCreate handler to ensure
that the media session has already been completely filled by the time the
session token is made available to the framework. There is no evidence that
this is required; however intuitively, this is likely the trigger for the
framework to start querying the media session.

The change was tested both with Desktop Head Unit and with a real vehicle.

[1] https://developer.android.com/training/cars/media/#initial-playback-state
2024-05-18 19:34:36 +02:00
084723ad76 Add episodes without subscribing (#7098) 2024-05-09 11:44:26 +02:00
292a21f8f8 Playback: remove special handling for Huawei (#7152)
This was introduced in 5105cdd7 to prevent crashes on Huawei phones[1].
However, it seems this has already regressed in 376ffed5, where the setActive
call was moved outside of the try-catch block.

Additionally, the problem is now 9 years old, and hopefully fixed for the users
already.

[1] https://stackoverflow.com/questions/31556679/android-huawei-mediassessioncompat
2024-05-01 11:36:15 +02:00
841bda020f Do not enable sleep mode in Android Auto (#7053)
When playback is started while an Android Auto projection is active, we want to
prevent automatic sleep timer from starting.

Note: the androidx.car.app library has not seen a full release since 1.2.0. We opted to use a release candidate here, which has a downgraded minSdk requirement, compatible with the current minSdk of AntennaPod at the time this dependency is introduced.
2024-04-17 00:01:34 +02:00
91bcf4b400 Work around race condition where position reset might be undone (#7102)
When the position saver ticks while the service is just about to be
stopped, it might happen that we first reset the position and then
set it to the end again. This works around this.
2024-04-15 19:23:26 +02:00
f3bca9d9e4 Add lazy loading to feed item list (#7091) 2024-04-13 19:18:13 +02:00
d9e84f8c38 Target SDK 34 (#7075) 2024-04-09 22:33:52 +02:00
e578f4ca93 CI tweaks (#7069)
- Run Checkstyle with gradle to make it easier for users
  - No longer needs different configuration for new code
  - Exclude current violations
  - Fix some violations that somehow couldn't be specified in the exclusion file
- Print SpotBugs/Lint/Checkstly violations in GitHub format
  - Then the CI run gets annotated on the web UI
2024-04-07 23:28:14 +02:00
fc40da28a7 Merge branch 'master' into develop 2024-04-07 10:42:25 +02:00
b6a4049ff4 Spotbugs cleanup (#6968)
Remove unused SpotBugs rules.
Fix URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD, ICAST_INTEGER_MULTIPLY_CAST_TO_LONG, NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION, OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE
2024-04-05 19:28:36 +02:00
92ab575b15 Delete core module (#7060) 2024-04-05 19:20:27 +02:00
2143ab1351 Move some tests from core module to their respective module (#7059) 2024-04-04 22:26:53 +02:00
a846e417b0 Fix playback state not being updated (#7050) 2024-04-01 09:55:30 +02:00
8accb54685 Move playback service to module (#7042) 2024-03-29 21:05:02 +01:00
f6b45e7162 Rename FeedMedia methods to no longer have underscores (#7017) 2024-03-23 11:27:55 +01:00
e1ef2a643a Update AndroidX libraries (#6940) 2024-03-09 10:56:58 +01:00
60f3d77eb2 Skip silence setting per feed (#6910) 2024-03-03 20:17:22 +01:00
e9d190da1b Bump AGP and Gradle (#6489) 2023-10-17 20:52:21 +02:00
2ee2cb6702 Ignore skip in first second of playback (#6704)
Users complained that they wanted to skip the ending of
an episode and accidentally skipped the next one that
started while their finger was moving.
2023-10-13 00:26:07 +02:00
f1f3674230 Fix Chromecast crash if FeedItem does not have a feed (#6541) 2023-07-15 22:03:50 +02:00
f8be7d596d Merge branch 'master' into develop 2023-05-05 19:43:45 +02:00