Android phone sharing screen will crash, only in the first installation completed to open the case, the subsequent opening will not appear
error:
dispatchingThrewException In MainThread
D/AndroidRuntime(14999): Shutting down VM
I/QarthLog(14999): [PatchStore] createDisableExceptionQarthFile
I/QarthLog(14999): [PatchStore] create disable file for com.example.conference uid is 10261
E/AndroidRuntime(14999): FATAL EXCEPTION: main
E/AndroidRuntime(14999): Process: com.example.conference, PID: 14999
E/AndroidRuntime(14999): java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime(14999): at android.os.Parcel.createExceptionOrNull(Parcel.java:2390)
E/AndroidRuntime(14999): at android.os.Parcel.createException(Parcel.java:2374)
E/AndroidRuntime(14999): at android.os.Parcel.readException(Parcel.java:2357)
E/AndroidRuntime(14999): at android.os.Parcel.readException(Parcel.java:2299)
E/AndroidRuntime(14999): at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
E/AndroidRuntime(14999): at android.media.projection.MediaProjection.(MediaProjection.java:76)
E/AndroidRuntime(14999): at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:119)
E/AndroidRuntime(14999): at org.webrtc.ScreenCapturerAndroid.startCapture(:114)
E/AndroidRuntime(14999): at com.cloudwebrtc.webrtc.OrientationAwareScreenCapturer.startCapture(:62)
E/AndroidRuntime(14999): at com.cloudwebrtc.webrtc.GetUserMediaImpl$3.onReceiveResult(:509)
E/AndroidRuntime(14999): at android.os.ResultReceiver$MyRunnable.run(ResultReceiver.java:50)
E/AndroidRuntime(14999): at android.os.Handler.handleCallback(Handler.java:955)
E/AndroidRuntime(14999): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(14999): at android.os.Looper.loop(Looper.java:228)
E/AndroidRuntime(14999): at android.app.ActivityThread.main(ActivityThread.java:9087)
E/AndroidRuntime(14999): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14999): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:614)
E/AndroidRuntime(14999): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1129)
E/AndroidRuntime(14999): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(14999): at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:495)
E/AndroidRuntime(14999): at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:135)
E/AndroidRuntime(14999): at android.os.Binder.execTransactInternal(Binder.java:1161)
E/AndroidRuntime(14999): at android.os.Binder.execTransact(Binder.java:1130)
E/AndroidRuntime(14999): callee: null 1461/2739
E/AndroidRuntime(14999):
I/Process (14999): Sending signal. PID: 14999 SIG: 9
Android phone sharing screen will crash, only in the first installation completed to open the case, the subsequent opening will not appear
error:
dispatchingThrewException In MainThread D/AndroidRuntime(14999): Shutting down VM I/QarthLog(14999): [PatchStore] createDisableExceptionQarthFile I/QarthLog(14999): [PatchStore] create disable file for com.example.conference uid is 10261 E/AndroidRuntime(14999): FATAL EXCEPTION: main E/AndroidRuntime(14999): Process: com.example.conference, PID: 14999 E/AndroidRuntime(14999): java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION E/AndroidRuntime(14999): at android.os.Parcel.createExceptionOrNull(Parcel.java:2390) E/AndroidRuntime(14999): at android.os.Parcel.createException(Parcel.java:2374) E/AndroidRuntime(14999): at android.os.Parcel.readException(Parcel.java:2357) E/AndroidRuntime(14999): at android.os.Parcel.readException(Parcel.java:2299) E/AndroidRuntime(14999): at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231) E/AndroidRuntime(14999): at android.media.projection.MediaProjection.(MediaProjection.java:76)
E/AndroidRuntime(14999): at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:119)
E/AndroidRuntime(14999): at org.webrtc.ScreenCapturerAndroid.startCapture(:114)
E/AndroidRuntime(14999): at com.cloudwebrtc.webrtc.OrientationAwareScreenCapturer.startCapture(:62)
E/AndroidRuntime(14999): at com.cloudwebrtc.webrtc.GetUserMediaImpl$3.onReceiveResult(:509)
E/AndroidRuntime(14999): at android.os.ResultReceiver$MyRunnable.run(ResultReceiver.java:50)
E/AndroidRuntime(14999): at android.os.Handler.handleCallback(Handler.java:955)
E/AndroidRuntime(14999): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(14999): at android.os.Looper.loop(Looper.java:228)
E/AndroidRuntime(14999): at android.app.ActivityThread.main(ActivityThread.java:9087)
E/AndroidRuntime(14999): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14999): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:614)
E/AndroidRuntime(14999): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1129)
E/AndroidRuntime(14999): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(14999): at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:495)
E/AndroidRuntime(14999): at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:135)
E/AndroidRuntime(14999): at android.os.Binder.execTransactInternal(Binder.java:1161)
E/AndroidRuntime(14999): at android.os.Binder.execTransact(Binder.java:1130)
E/AndroidRuntime(14999): callee: null 1461/2739
E/AndroidRuntime(14999):
I/Process (14999): Sending signal. PID: 14999 SIG: 9