Adobe’s Mike Chambers has revealed a new feature in AIR 2.0, the desktop runtime based on Flash.
At the Flash on the Beach conference in Brighton, he showed the NativeProcess API. You can “call and communicate” with external applications.
There are several restrictions, for security reasons. The application must be distributed as a native installer, not as an AIR download, and it cannot execute applications within its own directory.
Another new feature is that you can also open the default application for a specified file. For example, you could have your application generate a spreadsheet and open it in Excel on Windows or Mac (if Excel is the default handler for a spreadsheet). This feature works in any AIR application, though again the file cannot be within the application directory. There is also a blacklist of disallowed file types.
I am sure there will be debate about the security implications; it will be interesting to examine the new capabilities in more detail.
This strikes me as a useful new feature, significantly extending the capabilities of an AIR application.
More info in Mike Chamber’s slide deck; and comments from Marc Hibbins who says:
I’m sure this is would have been the most requested feature by far – that AIR should be able to launch files in their native apps and run other applications or processes securely.
This is huge. As for security implications – well it’s a native desktop app and users should (by now) be aware of associated risks and only install programs from trusted sources.
One point of clarification — invoking native applications requires a native installer not for security reasons but to maintain the cross operating nature of the .air fie format. Since native code is generally not portable, you will need to package and deploy your application as a native installer if you want to invoke a native process. AIR applications, whether deployed as an .air file or as a native installer, run with the same user privileges as native applications.
BTW, the open document API does not specify the path of the application that should be used to open a document; instead, it asks the operating system to use the default application associated with the file format of the document you wish to open. Because of that, this is an API that works well across operating systems. For example, an .mp3 file, when invoking this API, might open in iTunes on a Mac, Windows Media Player on Windows and Song Bird on a Linux machine.
We’ll be sharing more details about AIR soon beginning at Adobe MAX in less than two weeks.
Thanks,
Rob Christensen
Product Manager, Adobe AIR
Another question. If an Air application is packaged as a native application, will this include the Air Run-Time too or has the Run-Time to be installed in advance on the machine? In the first case the applications might become quite large …
Will compc and mxmlc be invokable and distribuable (technically, and according to adobe licensing) ?
Will Air 2.0 allow burning CD/DVD from within the Air application? In other words, does Air have API for using CD/DVD burner?