Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate back navigation from deprecated APIs#702

Open
wasky wants to merge 1 commit into
moneytoo:master from
wasky:migrate-back-navigation
Open

Migrate back navigation from deprecated APIs #702
wasky wants to merge 1 commit into
moneytoo:master from
wasky:migrate-back-navigation

Conversation

@wasky

@wasky wasky commented Nov 24, 2025

Copy link
Copy Markdown

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /