-
Notifications
You must be signed in to change notification settings - Fork 915
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
【Android】录屏闪退 #94
Comments
compileSdk 和targetSdk 均为29 ,有无非降级的解决方案 |
android:foregroundServiceType="mediaProjection" |
`
} ` 这个类是sdk内部的,按照文章的说法,也是sdk做兼容 |
这个问题最新SDK还没有修复 |
遇到了同样的问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
【当前现象】开启录屏后闪退
【集成包】Smart SDK版本:7.4.9209
【机型】android 10机型
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { (has extras) }} to activity {com.tencent.rtmp.video.TXScreenCapture$TXScreenCaptureAssistantActivity}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.app.ActivityThread.deliverResults(ActivityThread.java:5587)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5628)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
at android.media.projection.MediaProjection.(MediaProjection.java:75)
at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:104)
at com.tencent.rtmp.video.TXScreenCapture$TXScreenCaptureAssistantActivity.onActivityResult(TXScreenCapture.java:45)
at android.app.Activity.dispatchActivityResult(Activity.java:8412)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5580)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5628)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(libmapleservices.so:16270636)
at android.media.projection.IMediaProjection$Stub.onTransact(libmapleframework.so:18629684)
at android.os.Binder.execTransactInternal(libmapleframework.so:5520784)
at android.os.Binder.execTransact(libmapleframework.so:5519996)
The text was updated successfully, but these errors were encountered: