0

Ar-vos (https://ar-vos.com), my Unity - ARCore - based app does not start on Android-12 anymore after solving the android:exported="true" issue.

In particular I want it to work with a version of Unity 2018, I tried with all versions up to U 2018.4.36, but found no solution. A version based on U 2019.4.35 works, but in this version all the prefabs created by my clients look very bad, thus I cannot deploy that version either. :-(

I am really desperate trying to fix this, I have clients that need an updated version which I cannot deploy to the PlayStore at the moment.

If anybody out there has an Unity 2018 - ARCore - based App and was able to create a version for Android Api level >= 31, and has successfully deployed that version to the PlayStore, I would like to talk. Although AR-vos is an open source project, it has also a commercial side, i.e. I am willing to pay for help.

My manifest looks like this

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.arpoise.ARvos"
    android:installLocation="auto"
    android:targetSandboxVersion="2"
    android:versionCode="20220213"
    android:versionName="1.12" >

    <uses-sdk
        android:minSdkVersion="24"
        android:targetSdkVersion="32" />

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

    <uses-feature android:glEsVersion="0x00020000" />

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

    <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" />

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

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

    <application
        android:extractNativeLibs="false"
        android:icon="@mipmap/app_icon"
        android:label="@string/app_name"
        android:theme="@style/UnityThemeSelector" >
        <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:label="@string/app_name"
            android:launchMode="singleTask"
            android:screenOrientation="fullSensor" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

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

        <meta-data
            android:name="unity.tango-enable"
            android:value="True" />
        <meta-data
            android:name="unityplayer.SkipPermissionsDialog"
            android:value="true" />
        <meta-data
            android:name="unity.build-id"
            android:value="e50bd308-bd13-4431-83b0-92ad104e18cd" />
        <meta-data
            android:name="unity.splash-mode"
            android:value="0" />
        <meta-data
            android:name="unity.splash-enable"
            android:value="True" />
        <!-- 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="210910000" /> <!-- 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" />

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

</manifest>

On my Android-12 devices this displays the Unity splash screen and then turns black. On older Android devices it works fine.

If I change the target version to android:targetSdkVersion="30" the app installs and works fine on my Android-12 AND older devices.

But I cannot release an app with android:targetSdkVersion="30" to the Play-Store anymore.

There must be something more than just setting android:exported="true" for Unity 2018 based apps on Android-12, but I cannot find a solution.

I tried to find ways to make the intent work again, but could not find a solution.

If somebody wants to have a look at it, I uploaded the apk and the entire Unity project to https://arpoise.com/transfer/, I used Unity 2018.4.23 for the project.

  • If its a missing android:exported flag issue, it won't even install the app. So you can consider its not related to exported flag - Voxel Busters – Ayyappa Apr 09 '22 at 13:16

2 Answers2

0

I've also encountered this problem, which is caused by the incompatibility between Unity 2018 and Android 12. Please try checking this option.

Unity 2018.4.7f1 LTS

PlayerSettings -> OtherSettings -> Mute OtherAudioSources check

This worked for me

ovels
  • 1
-1

Because there seems to be no answers, I turned the issue into a bug on my github, if you find this and have something to say, please react to https://github.com/ARPOISE/ARpoise/issues/24,

Greetings

Peter

  • Please edit your question and include this in your question. This is not really an answer. – Yamuk Apr 16 '22 at 22:54