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

FC when take screenshot on Android 11 #108

Open
mzddev opened this issue Dec 1, 2021 · 0 comments
Open

FC when take screenshot on Android 11 #108

mzddev opened this issue Dec 1, 2021 · 0 comments

Comments

@mzddev
Copy link

mzddev commented Dec 1, 2021

FC when take screenshot on Android 11 (latest code):

java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.os.Parcel.createExceptionOrNull(Parcel.java:2385)
at android.os.Parcel.createException(Parcel.java:2369)
at android.os.Parcel.readException(Parcel.java:2352)
at android.os.Parcel.readException(Parcel.java:2294)
at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
at android.media.projection.MediaProjection.(MediaProjection.java:68)
at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:162)
at com.github.cvzi.screenshottile.App.createMediaProjection(App.java:126)
at com.github.cvzi.screenshottile.TakeScreenshotActivity.prepareForScreenSharing(TakeScreenshotActivity.kt:269)

@mzddev mzddev changed the title FC when take screenshot in Android 11 FC when take screenshot on Android 11 Dec 1, 2021
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

1 participant