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

The ScreenCapture example doesn't work on API 30+ #86

Open
raul-guerrero opened this issue Oct 30, 2022 · 1 comment
Open

The ScreenCapture example doesn't work on API 30+ #86

raul-guerrero opened this issue Oct 30, 2022 · 1 comment

Comments

@raul-guerrero
Copy link

As stated in the title, the ScreenCapture example doesn't work anymore as API 30+ forcefully requires to run any MediaProjection code as a Foreground service, and even as I rewrote the sample code to run that way, it captures a black screen.
I found a ticket in Google's issue tracker stating that bug, so it seems is reported, but still hasn't been addressed https://issuetracker.google.com/issues/214397245?pli=1

This is a huge problem, as most of our application's functionality relies on such feature to work, and if even the Android provided examples fail, we can't upgrade our app to the latest Android API version.

@fan123199
Copy link

Yes, I got this error too "Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION". Please help to provide a runnable example.

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

No branches or pull requests

2 participants