Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[screen-capture] Fix callback on api 34 #26549

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

alanjhughes
Copy link
Collaborator

@alanjhughes alanjhughes commented Jan 20, 2024

Why

Closes #26476
Closes ENG-11138

Android 14 requires the permission DETECT_SCREEN_CAPTURE to listen for changes. We can also use a new activity callback on api 34.

How

Added the permission and used the Activity callback when running on Android 14.

Test Plan

  • Tested in provided repro on physical device running android 14
  • If someone with a device running android 13 can test because the callbacks don't fire in the emulator cc @lukmccall

Copy link

linear bot commented Jan 20, 2024

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jan 20, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jan 20, 2024
@alanjhughes alanjhughes marked this pull request as ready for review January 22, 2024 11:07
@alanjhughes alanjhughes merged commit 650ffd8 into main Jan 22, 2024
9 checks passed
@alanjhughes alanjhughes deleted the @alanhughes/fix/screenshot-api-34 branch January 22, 2024 11:15
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Jan 23, 2024
@jatinhemnani01
Copy link

Hey @alanjhughes, I'm using this package and the addScreenshotListener isn't working on Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expo-screen-capture addScreenshotListener not firing on Android
5 participants