You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
mzddev
changed the title
FC when take screenshot in Android 11
FC when take screenshot on Android 11
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)
The text was updated successfully, but these errors were encountered: