Lock Task Mode default app and secondary app

With a device in lock task mode, is there a way to set one activity as the “default” activity, and another activity that if called is allowed, but does not launch at startup?

Right now, i have two whitelisted applications: the custom fit unity activity, and my application. The lock task service always runs the custom fit unity activity on startup. I have tried updating my app package to be first in alphabetical preference order (by app name and by company name), but lock task mode still always runs the magic leap app first. What is the best way for me to get my application to run at startup instead?

We use the same logic that is on Android 10 devices, so some of AOSP’s documentation and forums might be able to provide more clarification. However I think it comes down to the Manifest of your application vs the custom fit app. You could make your app open first by making it a launcher app. This can be done by directly editing the manifest, but Unity may allow you to do it through the Player Settings.

<activity android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.HOME" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

Note the default Lock task mode service that comes on the Magic Leap 2 is just a basic implementation, you may want to look at using an MDM for more control or possibly creating a custom home menu app that auto launches your application.