IDEA : Flex ADL launch support for app parameters

Hi,
Adobe doc says that parameters can be passed to the app through ADL by appending -- parameters to the ADL command line
http://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7fd7.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7f65

However, when i typed "-- tick tock" in the ADL options in the run/debug configurations, it was appended BEFORE the descriptor files.

ADL launch command:
D:\ApacheFlex\flex-sdk\bin\adl.exe -profile extendedMobileDevice -screensize iPad -XscreenDPI 132 -XversionPlatform IOS -- tick tock D:\ApacheFlex\out\production\flex-sdk-mobile-sandbox\FlexSdkMobileSandbox-app.xml D:\ApacheFlex\out\production\flex-sdk-mobile-sandbox


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

0
3 comments
Avatar
Permanently deleted user

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.

What do you think?

0

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.

0
Avatar
Permanently deleted user

Actually, it's the other way around:

when running on ADL with -XversionPlatform IOS (and screensize / DPI of iPad) these are the values returned:
Capabilities.os = "Windows 7"
Capabilities.version= "IOS 12,0,0,68"

When run on an iPad iOS6 device:
Capabilities.os="iPhone OS 6.0.1 iPad2,1"
Capabilities.version="IOS ..."

So Capabilities.version is good on both device and ADL (thanks to -XversionPlatform ADL option) but it only gives the OS type.
Capabilities.os is good only on the device.

I tried various "secret variables" in the command line, such as -Xversion, -Xos, -XosPlatform, it always fails with exit code 6 (application descriptor not found).

0

Please sign in to leave a comment.