Test APKs or do Build and Run with Application Simulator?

Hello. This is more of a question than issue, but as a new developer to the Magic Leap 2 I was curious if there are ways to do the following:

  • Load an .apk of a Magic Leap 2 application onto the Application Simulator
  • Use Build and Run in Unity while connected to the Application Simulator somehow

The documentation for the App Sim claims it allows for developers to test and iterate their code without the need of a device, so if the features above exist or some other alternative I'm all ears for it. Thank you!

Using Unity 2022.2.0b10

MLSDK Version 1.0.0
ML Hub Version 2.0.4.202209211434
ML App Sim Version 3.3.0.20220921

@sebjschindler The Application Simulator is not for Build-and-Run. The two things are mutually-exclusive development paths.

To use the App Sim in Unity, when it's set up properly, you click the "Play" button and the app will run on-device u til you unclick the "Play" button.

https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/app-sim-setup

I'm not sure I understand what you're actually asking — is it something like you're trying to attach an already-compiled app to the App Sim? If that's the case, then no, that's not supported. That tool is for applications where the source code is readily visible.

Thank you for both your replies!

So then what exactly is the point of the App Sim? Does the App Sim reflect a near 1:1 environment of how the app would look on the ML2 device? The main thing I'm looking for is if I can be confident in App Sim testing being near identical to on-device testing since we have limited hardware, yet have multiple developers on the project.

The main purpose of the App Sim is to reduce iteration time to as close to zero as possible. Build & Run takes time to compile, but the App Sim takes just a moment to get running by clicking "Play."

Changing one thing here and there becomes much faster when you don't have to deploy (or even have a device a all) to test.

Okay, that makes sense. So I can expect the same results of what I see in the App Sim to be translated into a build I put on device? Or are there any differences I should note (other than testing performance on device)

@sebjschindler I'd recommend checking out the docs as they'll be able to explain it pretty well. It requires that bit of nuance to make sure I don't mislead you, but it's more-or-less equivalent, but not, however, always the same.