Android API 34+ Receiver_Exported crash on App Start

Hey! I’m not familiar with the format I should be providing here as I’m new to the forum, but will describe the issue as well as I can, if any additional files are needed I’m happy to provide them, this issue’s been taking some time and most of the similar responses did not help me address it, my assumption is one of the plugins is causing the issue described below:

This is an older project that was being maintained in Unity 2021, and moved to 2022.3.47f1

What is the issue? Building for Android API 34+ causes this error:

E AndroidRuntime: java.lang.SecurityException: com.caldera.ar: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn’t being registered exclusively for system broadcasts

I’ve tried manually updating the Manifest xml files to contain the signal variable but did not work, I tried it with both the Assets/Plugins/Android/AndroidManifest.xml and the combined manifest.,

10-01 13:28:19.591  7634  7786 E AndroidRuntime: FATAL EXCEPTION: Bugsnag Thread #1
10-01 13:28:19.591  7634  7786 E AndroidRuntime: Process: com.hotspring.hssarunity, PID: 7634
10-01 13:28:19.591  7634  7786 E AndroidRuntime: java.lang.SecurityException: com.hotspring.hssarunity: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3240)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:3224)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3207)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3149)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6092)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1924)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1864)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1852)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:778)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at com.bugsnag.android.Client$3.run(Client.java:259)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:1012)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at com.android.server.am.ActivityManagerService.registerReceiverWithFeatureTraced(ActivityManagerService.java:14838)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14640)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2757)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2814)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 	at android.os.Binder.execTransactInternal(Binder.java:1500)
10-01 13:28:19.591  7634  7786 E AndroidRuntime: 
10-01 13:28:45.693  8179  8295 E AndroidRuntime: FATAL EXCEPTION: Bugsnag Thread #1
10-01 13:28:45.693  8179  8295 E AndroidRuntime: Process: com.hotspring.hssarunity, PID: 8179
10-01 13:28:45.693  8179  8295 E AndroidRuntime: java.lang.SecurityException: com.hotspring.hssarunity: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3240)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:3224)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3207)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3149)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6092)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1924)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1864)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1852)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:778)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at com.bugsnag.android.Client$3.run(Client.java:259)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
10-01 13:28:45.693  8179  8295 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:1012)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.hotspring.hssarunity"
    android:installLocation="preferExternal"
    android:versionCode="55"
    android:versionName="3.3" >

    <uses-sdk
        android:minSdkVersion="27"
        android:targetSdkVersion="35" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <uses-feature android:glEsVersion="0x00030000" />
    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.location"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen.multitouch"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen.multitouch.distinct"
        android:required="false" />

    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature
        android:name="android.hardware.camera.ar"
        android:required="true" />
    <uses-feature
        android:name="com.google.ar.core.depth"
        android:required="true" /> <!-- Permission will be merged into the manifest of the hosting app. -->
    <!-- Is required to launch foreground extraction service for targetSdkVersion 28+. -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- Is required to launch foreground extraction service for targetSdkVersion 34+. -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
    <uses-permission android:name="android.permission.ACCESS_ADSERVICES_ATTRIBUTION" />
    <uses-permission android:name="android.permission.ACCESS_ADSERVICES_AD_ID" />

    <queries>
        <package android:name="com.google.ar.core" />
        <package android:name="com.android.vending" />

        <intent>
            <action android:name="com.google.android.play.core.install.BIND_INSTALL_SERVICE" />
        </intent>
        <intent>
            <action android:name="android.intent.action.SEND" />

            <data android:mimeType="*/*" />
        </intent>
        <intent>
            <action android:name="android.intent.action.SEND_MULTIPLE" />

            <data android:mimeType="*/*" />
        </intent>
    </queries>

    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

    <permission
        android:name="com.hotspring.hssarunity.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.hotspring.hssarunity.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" />

    <application
        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
        android:extractNativeLibs="true"
        android:icon="@mipmap/app_icon"
        android:label="@string/app_name" >
        <meta-data
            android:name="unity.splash-mode"
            android:value="0" />
        <meta-data
            android:name="unity.splash-enable"
            android:value="True" />
        <meta-data
            android:name="unity.launch-fullscreen"
            android:value="True" />
        <meta-data
            android:name="unity.render-outside-safearea"
            android:value="True" />
        <meta-data
            android:name="notch.config"
            android:value="portrait|landscape" />
        <meta-data
            android:name="unity.auto-report-fully-drawn"
            android:value="true" />

        <activity
            android:name="com.unity3d.player.UnityPlayerActivity"
            android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density"
            android:exported="true"
            android:hardwareAccelerated="false"
            android:launchMode="singleTask"
            android:resizeableActivity="false"
            android:screenOrientation="fullUser"
            android:theme="@style/UnityThemeSelector" >
            <intent-filter>
                <category android:name="android.intent.category.LAUNCHER" />

                <action android:name="android.intent.action.MAIN" />
            </intent-filter>

            <meta-data
                android:name="unityplayer.UnityActivity"
                android:value="true" />
            <meta-data
                android:name="notch_support"
                android:value="true" />
        </activity>

        <meta-data
            android:name="unityplayer.SkipPermissionsDialog"
            android:value="true" />
        <meta-data
            android:name="com.google.ar.core"
            android:value="required" />

        <service
            android:name="com.google.firebase.components.ComponentDiscoveryService"
            android:directBootAware="true"
            android:exported="false" >
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.firestore.FirebaseFirestoreKtxRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.ktx.FirebaseCommonLegacyRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.FirebaseCommonKtxRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
        </service>

        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <!-- The services will be merged into the manifest of the hosting app. -->
        <service
            android:name="com.google.android.play.core.assetpacks.AssetPackExtractionService"
            android:enabled="false"
            android:exported="true" >
            <meta-data
                android:name="com.google.android.play.core.assetpacks.versionCode"
                android:value="20201" />
        </service>
        <service
            android:name="com.google.android.play.core.assetpacks.ExtractionForegroundService"
            android:enabled="false"
            android:exported="false"
            android:foregroundServiceType="dataSync" /> <!-- The activities will be merged into the manifest of the hosting app. -->
        <activity
            android:name="com.google.android.play.core.common.PlayCoreDialogWrapperActivity"
            android:exported="false"
            android:stateNotNeeded="true"
            android:theme="@style/Theme.PlayCore.Transparent" />

        <property
            android:name="android.adservices.AD_SERVICES_CONFIG"
            android:resource="@xml/ga_ad_services_config" />

        <provider
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:authorities="com.hotspring.hssarunity.firebaseinitprovider"
            android:directBootAware="true"
            android:exported="false"
            android:initOrder="100" /> <!-- The minimal version code of ARCore APK required for an app using this SDK. -->
        <meta-data
            android:name="com.google.ar.core.min_apk_version"
            android:value="240220000" /> <!-- This activity is critical for installing ARCore when it is not already present. -->
        <activity
            android:name="com.google.ar.core.InstallActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:excludeFromRecents="true"
            android:exported="false"
            android:launchMode="singleTop"
            android:theme="@android:style/Theme.Material.Light.Dialog.Alert" />

        <uses-library
            android:name="android.test.runner"
            android:required="false" />

        <activity
            android:name="com.yasirkula.unity.NativeShareCustomShareDialogActivity"
            android:exported="false"
            android:theme="@style/Theme.NativeShareTransparent" />

        <receiver
            android:name="com.yasirkula.unity.NativeShareBroadcastListener"
            android:exported="false" />

        <provider
            android:name="com.yasirkula.unity.NativeShareContentProvider"
            android:authorities="com.hotspring.hssarunity.NativeShareContentProvider"
            android:exported="false"
            android:grantUriPermissions="true" />
        <provider
            android:name="com.yasirkula.unity.NativeCameraContentProvider"
            android:authorities="com.hotspring.hssarunity.NativeCameraContentProvider"
            android:exported="false"
            android:grantUriPermissions="true" />

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>

        <service
            android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false" />
        <service
            android:name="com.google.android.gms.measurement.AppMeasurementJobService"
            android:enabled="true"
            android:exported="false"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <uses-library
            android:name="android.ext.adservices"
            android:required="false" />

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

Attached Manifests below

Manifest Files.zip (5.6 KB)

As stated here - android - One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts - Stack Overflow, registerReceiver function requires a third parameter, something from Client.java calls registerReceiver without that parameter.