Open nahidmbstu opened 2 years ago
did you solution of this or not, if done it then kindly share with me , i have also same issue
I also have same issue
"Has anyone found a solution for the app crashing while sharing the screen when the app goes into the foreground or background mode?"
FATAL EXCEPTION: main
Process: com.explorastory, PID: 7659
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=-1, data=Intent { (has extras) }} to activity {com.explorastory/io.agora.rtc2.extensions.MediaProjectionMgr$LocalScreenCaptureAssistantActivity}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.app.ActivityThread.deliverResults(ActivityThread.java:5898)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5937)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:144)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2643)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:368)
at android.app.ActivityThread.main(ActivityThread.java:8839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.os.Parcel.createExceptionOrNull(Parcel.java:3087)
at android.os.Parcel.createException(Parcel.java:3071)
at android.os.Parcel.readException(Parcel.java:3054)
at android.os.Parcel.readException(Parcel.java:2996)
at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:313)
at android.media.projection.MediaProjection.
I also have same issue
@HosamCS does your problem sloved?
java.lang.RuntimeException: Unable to start service com.asterinet.react.bgactions.RNBackgroundActionsTask@c931e06 with Intent java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Activity com.facebook.react.bridge.ReactContext.getCurrentActivity()' on a null object reference