-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
App crashes when the app goes into the background while sharing the screen. #234
Comments
try change <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" /> ref: https://developer.android.com/about/versions/14/changes/fgs-types-required#media-projection |
@BagasNS does this solution working for you ? Hi, We have already included the permission in the AndroidManifest.xml file. However, the app crashes when we install the APK for the first time and attempt to grant permission to share. The crash occurs when the app goes into the background. Once we reopen the app and attempt to share again, it does not crash. @Rapsssito Since we need to release this on the Play Store, we have to fix this issue as soon as possible. Thanks |
@Rapsssito waiting for your response FATAL EXCEPTION: main Process: com.explorastory, PID: 902 |
@BagasNS ? |
please refer to this url #228 (comment) |
Thanks, @BagasNS! The app is no longer crashing, but the microphone isn't working while the app is in the background. However, it functions properly in the foreground, where both camera and microphone permissions are granted. |
"react-native-background-actions": "^4.0.1",
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.2.11394342"
kotlinVersion = "1.9.22"
`package com.asterinet.react.bgactions;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;
import com.facebook.react.HeadlessJsTaskService;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.jstasks.HeadlessJsTaskConfig;
final public class RNBackgroundActionsTask extends HeadlessJsTaskService {
}
`
@Rapsssito, I need to release the app on the Play Store with target SDK 34. Please mark this as urgent. Thanks
FATAL EXCEPTION: main Process: com.explorastory, PID: 16580 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1001, result=-1, data=Intent { (has extras) }} to activity {/io.agora.rtc2.extensions.MediaProjectionMgr$LocalScreenCaptureAssistantActivity}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
Originally posted by @vishalyad16 in #223 (comment)
The text was updated successfully, but these errors were encountered: