Switch to immersive mode on run time

Dear Magic Leap Team,

Is it possible to switch to immersive mode at run time?
For example, starting as "normal" Android app, then using a button to start the immersive mode.

Flowing the Magic Leap documentation Modifying APK for AR | MagicLeap Developer Documentation this only allows having an Activity configured for immersive mode by adding this line:
<meta-data android:name="com.magicleap.augmented_reality_only" android:value="true" /> to AndroidManifest.xml for that Activity.

What we are doing right now, starting a MainActivity which is a normal Android Activity, then from that starting a MagicLeapActivity, which is configured as immersive.

It would be great to just have one Activity switching on runtime to immersive mode.


It is not currently possible to have one activity that is both a "standard Android Activity" and also a Native Application running in Magic Leap's AR runtime. This is primarily as those two have a different surface area for sending composition. Though there are no plans to change this in the short term I have noted this as a possible improvement for the platform team to investigate longer term.