Skip to content

Conversation

@wasky
Copy link

@wasky wasky commented Nov 24, 2025

Since Android 13, PlayerActivity.onBackPressed() is no longer invoked. This broke the app’s behavior, for example videos would unexpectedly resume when returning to the app, and the player’s controller wouldn’t hide on Android TV. This commit restores the intended behavior by migrating from onBackPressed() and onKeyDown(KEYCODE_BACK) to the new OnBackInvokedCallback API.

Migration documentation is available here: https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#migrate-app

Since Android 13, PlayerActivity.onBackPressed() is no longer invoked.
This broke the app’s behavior, for example videos would unexpectedly
resume when returning to the app, and the player’s controller
wouldn’t hide on Android TV. This commit restores the intended
behavior by migrating from onBackPressed() and
onKeyDown(KEYCODE_BACK) to the new OnBackInvokedCallback API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant