Note: I have seen there is a "Program parameters" box, but it's only available for desktop apps, not mobile apps.So maybe it was considered there is no use of passing parameters to a mobile app, so the option was removed ?

Maurice

Votes

0

Share

I have tested manually passing the arguments from the command line directly, and retrieving them in the InvokeEvent.arguments invoke handler and it worked.So really it would be nice to have this option directly in IDEA, so that we can simply debug the application in ADL.

FYI the use case is the following:Some APIs (such as Capabilities.os / Capabilities.version) return different values when run under ADL or directly on the device, which makes it complex to test functionalities that relies on these values.It would be more convenient if we could "force" the values through "secret arguments" to more easily debug the various combinations, or do unit testing.

Indeed there's no ability to pass program parameters to the mobile emulator launched by the IDE. We just thought that the feature won't be requested because you can't pass params to the real device.Note that you have control on what Capabilities.os returns. By default it is either IOS or AND depending on the emulator chosen in the run configuration. You can set any other value using -XversionPlatform ADL option - it will be returned by Capabilities.os. Probably there's also a secret ADL option for Capabilities.version, my intuition says it could be named -Xversion, though I didn't try.