Accessing AIRAliases.js in my air application

I have my air.htl as:
<html>
<head>
<title>Dierbergs Web Applications</title>
<script language="javascript" type="text/javascript"
src="AIRAliases.js"></script>
<script language="javascript">
function init() {
window.nativeWindow.addEventListener(air.Event.CLOSING,
onClosingEvent);
window.nativeWindow.maximize();
function onClosingEvent(event) {
if (!confirm("Exit Dierbergs Web Applications? Any unsaved
changes will be lost."))
event.preventDefault();
</script>
</head>
<body onload="init()">
<!-- Load into a frame to preserve the javascript in this
file. -->
<frameset rows="100%">
<frame src="
http://hq1svrdev001/zkintranet/index.zul">
</frameset>
</body>
</html>
And in my application I want to use the below commands:
var urlReq = new air.URLRequest(url);
air.navigateToURL(urlReq);
for eg my print.zul is :
<zk>
<window id="winBenryPrint"
title="Print"
sizable="false"
closable="true"
mode="overlapped"
border="normal"
style="overflow:hidden;"
top="5px"
left="10px"
width="325px"
height="175px"
onClose="contractEditor.btnPrnClose()">
<vbox width="100%" height="100%" align="center">
<vbox>
<label value="Select Report:"/>
<hbox>
<button id="btnPrnPrint" label="Print!" width="75px"
action="onclick:oncall()"/>
</hbox>
<textbox id="txtPrnDescription" width="275px"
rows="5"/>
</vbox>
</vbox>
<html><![CDATA[
<script type="text/javascript">
function oncall(){
var url = "
http://elsa.berkeley.edu/";
var urlReq = new air.URLRequest(url);
air.navigateToURL(urlReq);
</script>
]]></html>
</window>
</zk>
So my question is as AirAlliases.js is on my application
level ie: After running an app this is the structure:
--Zkintranet.exe
--AIRAliases.js
--zkinranet.html
So what should be done so that in the <frame src="
http://hq1svrdev001/zkintranet/print.zul">
page so that I can access the shortcuts... I saw the
http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f08. html
which specifies for iframe but got confused as to how it would
apply to my application.. So please if step by step is shown it
would help...

Here's an example of using the sandbox bridge in an HTML
application:
http://www.adobe.com/devnet/air/ajax/quickstart/sandbox_bridge.html
In that example, content in one frame is loaded into a remote
sandbox (the "
http://localhost" sandbox). In
this case, the content is loaded from a local file (in the AIR
application directory) and mapped to the remote sanbox using the
sandboxRoot attribute of the iframe.
However, it sounds like you want to expose AIR functionality
to content loaded from a remote HTTP server. To do this you use the
AIR sandbox bridge. In your main application HTML file
(zkinranet.html, I think), do a couple of things:
1. Load the remote content via an iframe (or a frame). Give
that iframe/frame an ID (such as id="remoteContent").
2. In the JavaScript of your main application file, add
functions to the sandbox bridge, as in:
var Exposed = {};
Exposed.trace = function(str) {
air.trace(str);
document.getElementById('remoteContent').contentWindow.parentSandboxBridge
= Exposed;
Now JavaScript in your remote content can call the trace()
function, which calls the bridged AIR functionality, defined in
step 2.
It is a bit complicated, yes. But for security purposes,
remotely loaded content must not have direct access to AIR APIs
without the host application explicitly granting permission via the
sandbox bridge.

Similar Messages

  • Access You local Scanner in Air Application

    is it possible to access your local scanner and scan a document using air application?

    You'll probably need to use NativeProcess to interact with the driver.

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • I start the computer the screen has blue vertical stripes and says that the Adobe Air application can not be found. Some of my programs don't run and say: You: Error access violation at 0x0055F525

    I start the computer the screen has blue vertical stripes and says that the Adobe Air application can not be found. Some of my programs don't run and say:
    You: Error access violation at 0x0055F525. I reinstalled Adobe Air. No change. I went to the Adobe webside and they said to repair it with a program. I bought RegCure. Didn't change anything. What to do?

    Hello cor-el, thanks for your reply. I changed my settings for downloads to desktop and it has appeared on there. When I double click I am asked which program I want to open file. I click firefox and another box "opening install" says I have chosen to open the file which is an application and do I want to save it. This is the only real option so I press save file. I get a box saying this is an executable file which may contain viruses - do you want to run. I press ok and the final box showing C drive file name and desktop appears stating application not found.
    This happens the same whenever I try to install.
    To my untrained eye the application is not being recognised as an application and I cannot work out how to get it to do that.
    My plugin is still showing as out of date.
    Is there anything you could suggest. Thanks for your time.

  • AIR Application Sandbox Bridge Issue

    I am having an issue accessing the sandbox bridge from my application core page.
    The only thing I think it might be is I am using ajax for a login procedure so it might bolo it because of that.
    if anyone has any ideas I could use a fresh pair of eyes,
    If I strip it and create a new basic client I can get the sandbox bridge to work and launch the internet explorer , but with this client it won't
    here is the code for my AIR app document
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Viper: Nuclear Edition</title>
    <link rel="stylesheet" type="text/css" href="../../lib/css/viperapp-interface.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/css/module-headers.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/css/p7exp.css" />
            <script src="/AIRAliases.js"></script>
    <script type="text/javascript" src="../../lib/js/scripts.js"></script>
    <script type="text/javascript" src="../../lib/js/p7exp.js"></script>
            <script language="javascript">
    //This code is placed in the root document header
    //This function is written to run from the sandbox. It opens a url in an external browser
    function processURL(){
    var searchString = document.location.search;
    // strip off the leading '?'
    searchString = searchString.substring(1);
    var nvPairs = searchString.split("&");
    for (i = 0; i < nvPairs.length; i++)
    var nvPair = nvPairs[i].split("=");
    var name = nvPair[0];
    var value = nvPair[1];
    alert(searchString);
    function remoteLogin(){
    var searchString = document.location.search;
    viperframe.location.href = 'http://devcenter.viperapp.com/cgi/login.cfm'+ searchString;
    function testRemote(){
    alert('this is working');
    function noLogin(){
    alert('Your login information was incorrect, please try again');
    top.location.href="login.html";
    //This code is placed in the root document header
    //This function is written to run from the sandbox. It opens a url in an external browser
    function openExternalURL(href) {
    var request = new air.URLRequest(href);
    try {
    air.navigateToURL(request);
    catch (e) {
    alert(e);
    var Exposed = new Object();
    // expose the trace() function.
                 Exposed.trace = function(str) {
                    air.trace(str);
    Exposed.openExternalURL = openExternalURL;
    Exposed.testRemote = testRemote;
    Exposed.noLogin = noLogin;
    function doLoad() {
    //Place the Exposed object on the parentSandboxBridge property of the ui frame's window object.
    var frame =  document.getElementById('viperframe').contentWindow.parentSandboxBridge = Exposed;
    setIframeHeight('viperframe');
    remoteLogin();
    // window.callMe = document.getElementById('viperFrame').contentWindow.childSandboxBridge.callMe;
    //var frame = document.getElementById('viperFrame').contentWindow.parentSandboxBridge = Exposed;
    </script>
    </head>
    <body onload="doLoad();" onresize="setIframeHeight('viperframe');" onfocus="setIframeHeight('viperframe');" bgcolor="#222222">
    <!-- END P7EXP PULLDOWN MENU -->
    <div id="headerToolBar">
    <div id="headerToolUser">
    <ul>
    <li><a href="javascript:void(0);">Logged in  <strong>
                        </strong></a></li>
    <li><a href="login.html" target="_parent"><strong>Log Out</strong></a></li>
    <li><div id="windowTools"><a href="javascript:void(0);" onClick="parent.minimizeWindow()"><img src="../../lib/img/headertoolbar/icon_minimizewindow.png" width="18" height="18" border="0" /></a><a href="javascript:void(0);" onClick="parent.maximizeWindow()"><img src="../../lib/img/headertoolbar/icon_expandwindow.png" width="18" height="18" border="0" /></a><a href="javascript:void(0);" onClick="parent.closeWindow()"><img src="../../lib/img/headertoolbar/icon_closewindow.png" width="18" height="18" border="0" /></a><div class="clearfloat"></div></div></li>
    </ul>
    </div>
    <div id="menuwrapper">
    <ul id="p7menubar">
    <!-- ADD SIDEBAR - TO COME IN LATER
    <li class="topnav"><a href="javascript:void(0);" class="trigger2"><img src="../../lib/img/headertoolbar/toolbar_icon_sidebar_open.png" width="27" height="13" border="0" /></a></li>
    -->
      <!-- PLANT SELECTOR - NOT FOR DELIVERABLE
    <li class="topnav"><a href="javascript:void(0);" class="trigger">Plant: <strong>SNPP</strong></a>
    <ul>
    <li><a href="javascript:void(0);">Plant Selector</a></li>
    <li><em> </em></li>
    <li><a href="javascript:void(0);">SNPP</a></li>
    <li><a href="javascript:void(0);">BM</a></li>
    <li><a href="javascript:void(0);">SRNP</a></li>
    </ul>
    </li>
    -->
    <li class="topnav"><a href="javascript:void(0);" class="trigger">File</a>
    <ul>
    <li><a href="login.html" target="_blank">New Window</a></li>
    <li><em> </em></li>
    <li><a href="javascript:window.print();" onclick="window.print();">Print</a></li>
    <li><em> </em></li>
    <li><a href="login.html" target="_parent">Log Out</a></li>
    <li><a href="javascript:void(0);" onClick="parent.closeWindow();">Quit VIPER</a></li>
    </ul>
    </li>
      <li class="topnav"><a href="http://designsupport.viperapp.com" target="_blank" class="trigger">Help</a>
      <ul>
    <li><a href="login.html" target="_parent">Reset Connection</a></li>
    <li><em> </em></li>
    <li><a href="http://designsupport.viperapp.com/contact.cfm" target="_blank">Contact Support</a></li>
                                <li><a href="license.html" target="viperframe">View License</a></li>
    </ul>
    </li>
    </ul>
    <div class="clearfloat"></div>
    </div>
    </div>
    <!-- END P7EXP PULLDOWN MENU -->
    <iframe src="" id="viperframe" name="viperframe" frameborder="0" scrolling="no" width="100%"></iframe>
    <!--<iframe name="viperFrame" id="viperFrame" src="http://devcenter.viperapp.com/VS/ui/screens/plantselections.html" frameborder="0" scrolling="no" width="100%"></iframe>-->
    </body>
    </html>

    I have tried running another command and it still doesn't run the external URL function, just if it runs my no login command via the sandbox bridge,
    and it is a simple command
    here is the javascript it is running on the nologin.
    function noLogin(){
    alert('Your login information was incorrect, please try again');
    top.location.href="login.html";
    if it runs that over the sandboxbridge it works , if it doesnt then it doesnt.
    Anyone have any ideas, and I missing something on my iframe  ?

  • Problem with Expose and Adobe AIR application -can't click on app in Expose

    I just installed a new Adobe AIR application called TwitterLocal. The app was working fine until I accidently hit some keyboard shortcut and the application window disappeared. I figured I accidently assigned the window to some other "space," however I do not have SPACES turned on. Furthermore, when I select EXPOSE, I can now see the content of the application's window, however if I click on the app (which takes on that grey-highlight appearance when you mouse over it) the desktop returns to its normal position. I can see via the top status bar that the app is currently selected, but I cannot access the app window.
    Is there any way to send an app that was "sent" to expose back to the normal desktop? I've tried rebooting and even uninstalling/reinstalling the app but it is still lost in expose.
    Any thoughts on this would greatly be appreciated.

    Solution was to change display to lower resolution, then the Adobe AIR app TwitterLocal became visible on the standard desktop and I was able to click on and move the app window towards the left of the desktop. Once I switched the resolution back, everything was ok.

  • How to play and stop flv files through NetStream in AIR Application

    Hi,
    In a folder I have 'n' number of flv file, which are DRM protected. when the user try to play those files for the first time through my AIR application, it will prompt for username and password and gets the license/voucher from the server and store it in AIR Runtime. so that from the next time onwords it won't prompt for username and password as because it already has license/voucher.
         My problem is assume there are 500 files, such that for each file the user has to enter his credentials[username and password]. which is a stupid thing. I want to avoid this process by implementing this process internally/programetically. By playing/accessing each file through netstream from the folder and setDRMAuthenticationCredentials for that file and stop the stream. Here I am able to play each file but I am failed to stop it. I mean to say I will get the license for all the flv files internally[while loading my AIR application], such that user should not be interrupted for his credentials for each file.He should play as if he is accessing/playing a non-DRM protected file. I will be very thank full if any one help me out in this.
    public function init():void {
          connectStream();
          getLicenseForAllFiles();
          videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, drmAuthenticateEventHandler);
          ppt_videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, ppt_drmAuthenticateEventHandler);
            private function getFilesRecursive(rootFolderPath:String):void {
                //the current folder object
                var currentFolder:File = new File(rootFolderPath);
                //the current folder's file listing
                var files:Array = currentFolder.getDirectoryListing();
                //iterate and put files in the result and process the sub folders recursively
                for (var f = 0; f < files.length; f++) {
                    if (files[f].isDirectory) {
                        if (files[f].name !="." && files[f].name !="..") {
                            //it's a directory
                            getFilesRecursive(files[f].nativePath);
                    } else {
                        //it's a file
                        fileList.push(files[f].nativePath);
                        //Alert.show(""+files[0].nativePath);
                        var fileName:String = files[f].name;
                        if(fileName.indexOf("PPT_")!=-1){
                            ppt_videoStream.play(files[f].nativePath);
                            ppt_videoStream.pause();
                        videoStream.play(files[f].nativePath);
                        videoStream.pause();
                private function connectStream():void {
                    videoConnection = new NetConnection();
                    videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    videoConnection.connect(null);
                    ppt_videoConnection = new NetConnection();
                    ppt_videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_videoConnection.connect(null);
                    videoStream = new NetStream(videoConnection);
                    videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    video.attachNetStream(videoStream);
                    ppt_videoStream = new NetStream(ppt_videoConnection);
                    ppt_videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_video.attachNetStream(ppt_videoStream);
             private function netStatusHandler(event:NetStatusEvent):void {
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        //connectStream();
                        break;
                    case "NetStream.Play.StreamNotFound":
                        trace("Unable to locate video: " + videoURL);
                        break;
                private function drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
                private function ppt_drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    ppt_videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
    Thanks
    Sudheer Puppala

    Hi,
    Please go through following links..this will help you:
    http://lucamezzalira.com/2009/02/28/create-pdf-in-runtime-with-actionscript-3-alivepdf-zin c-or-air-flex-or-flash/
    http://forums.adobe.com/thread/753959
    http://blog.unthinkmedia.com/2008/09/05/exporting-pdfs-in-flex-using-alivepdf/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Using async in an AIR application?

    After reading this FlexUnit tutorial:
    http://www.adobe.com/devnet/flex/articles/flashbuilder4_tdd.html
    I downloaded the files here:
    http://download.macromedia.com/pub/developer/flashbuilder4_tdd_source.zip
    ...and changed the project, FlexUnit4Examples, to an AIR application via FlashBuilder.  After I did that, it no longer passes all of its asynchronous tests.
    Do asynchronous tests have any issues or limitations with AIR?

    The problem I had was not related to FlexUnit.  It was the way I was tried to access the file system when it was an AIR application.  I used FileStream instead of what was in the tutorial that worked with a web base application, which was HTTPService.
    Since I am new with unit testing, I assumed that it was the test that was coded wrong.  I suppose I havent trusted my unit tests enough, since it told me that my source code was incorrect.

  • Using project libraries for both web-based and AIR applications

    I need to develop substantial code to build both web-based and AIR applications.  Yes, they will have different features, especially when it comes to accessing files on the local file system.
    However, 98% of the code can be shared.
    I want to use a project library that can be used for both types of applications. Maybe using conditional compile when required to not use AIR API's in a web-based application.
    I found this (somewhat old) warning:
    Include Adobe AIR libraries Select this option if your library must use AIR features, such as access to the AIR APIs. Flex Builder then changes the library path of this new Flex Library project so that it includes airglobal.swc and airframework.swc. Web-based Flex projects cannot use this library.
    Do not select this option if you are writing a generic library intended to be used only in a web-based Flex application, or in either a web-based or AIR-based application.
    Does this apply to Flash Builder 4.5?

    I have found a workaround, but it's quite clumsy, involving a transfer vector (in old-fashioned terms) in the main application for each function in the AIR library.
    I have created a library for AIR classes only (fourdtext.fileOperations is there). 
    The AIR application provides "Function" values that any other code in the general-purpose libraries can use.
    It works, but it's nasty.
    In Main.mxml:
    import com.fourdtext.fileOperations.AxFiles;
    // this gets a list of native path strings, from and array of "File" objects
    public var AxGetListFunction:Function = AxGetListRedirect;
    private function AxGetListRedirect(list:Array):Vector.<String>{
        return AxFiles.AxGetList(list);
    In general-purpose code:
    var list:Array = event.dragSource.dataForFormat("air:file list") as Array;
    var AxGetList:Function = FlexGlobals.topLevelApplication.AxGetListFunction;
    listFiles = AxGetList(list);

  • Can we resize swf file created with AIR API in AIR application?

    Hi,
    I created a .swf file with AIR API.
    I want to open and resize it in AIR application. This .swf file taking dimensions as default in which it opens.
    I want to change its width and height.
    Is there any way to change its dimensions?
    Please suggest me the solution.
    thank you

    Loading a Flex WindowedApplication into another is not supported.  However,
    you might be able to access the WindowedApplication and size it.  Sub-Apps
    in AIR should be based on Application, not WindowedApplication.

  • Displaying server stored images in an air application

    Usually when I go about displaying server stored images in a regular flex application I go about it the following way:-
    - Create a mysql database table on a server which contains image names
    - Create a php file which generates all of the image namesfrom the table as xml and upload this file to the server
    - Create a new flex application/project
    - In the application make a http service which points to my php/xml file and turns this data into an array collection
    - Set the array collection to the dataprovider of a tilelist component so that all of the images will eventually be displayed within it when they are created
    - I set the itemrenderer of the tilelist to an image component which has it's source set to something like source="{'assets/images'+ data.imagename}" with imagename being the field containing the name of the image which is stored in the mysql database table.
    - Make a folder in the app/project called assets/images which will contain all of the images
    - Upload the app to the server and once it runs all the images will be displayed in the application
    - Then any images that are uploaded to the server can also be displayed as long as their names are added to the mysql database
    My question is though how do you get server stored images to display within an Air Application? My air app will be used on multiple machines but I want the images in it to be dynamic i.e. stored on a server and can be changed. How can this be done?

    I'm struggling to figure out how to access the image files when the assets/images folder will be on a server and the app itself will be on the user's desktop whereas usually in the case of a regular flex app this wouldn't mater as both the app and the image files would be on the server together. Is what I'm trying to do possible i.e. displaying images on a desktop air app straight from a server?

  • AIR application not appearing in GotoMeeting Session

    I was demo-ing an AIR application last Friday, but the group
    that was on the GotoMeeting session was not a able to see the app.
    That particular desktop window was not being transmitted. I've also
    noticed a similar issue when trying to screen capture an AIR window
    locally on my laptop which is running Windows XP. It's as if that
    window does not exist and there is nothing to capture. Known bug?
    Thanks,
    -Frank

    Hi Naveen,
    It will be most probably because of Security not defined for this new application in the "Member Access profile". Please check.
    Thanks & Regards
    Arun Kumar S

  • Android Video play via AIR application is jerky

    Hi All,
      We are developing an AIR mobile application targetted for Android 2.2 or above. One of the requirement is to play H.264 videos on the mobile from the Assets folder (local file system). We have run in to a show stopper while trying to implement this feature, here are the details -
    1. We are using OSMF that comes bundled with Flex Builder 4.6
    2. Using Adobe AIR 3.1 and Flex SDK 4.6
    When video of quality H.264 MPEG4 1280*720 30FPS with input bit rate 2000 is being played on the mobile device (android), the video frame rate is choppy however on the desktop it plays out fine... StageVideo is something I would like to try however, at this moment I have no access to Android 3.0 which is required for StageVideo...
    What are we missing? Is AIR 3 not capable to play H.264 videos on android, though the Android native video player plays it out just fine?
    Regards
    Baliga

    Hi,
    Video encoding is very important.
    For example, use baseline profile level 3.1 for H264 for mobile
    (and not High profile level 4.1 recommended for desktop).
    For more information, see the MAX session of Fabio Sonnati:
    "Encoding for Performance on Multiple Devices"
    And if you have an Android phone/tablet, there is my AIR application
    to watch Adobe MAX 2011 videos :
    https://market.android.com/details?id=air.fr.inway.maxVideos2011
    Search "Sonnati" for this session's video.
    (For info, i use a video player based on OSMF 1.6)
    The pdf presentation is available on Sonmati's blog:
    http://sonnati.wordpress.com/
    Philippe

  • Testing adobe air applications with fake apple certificate in iOS simulator running in a hackintosh

    I can compile an Adobe Air application on windows with a fake apple certificate. Can I test this application in iOS Simulator running on a hackintosh? Or is the simulator blocking testing of IPA outside from XCode ie: it's not a standalone simulator for IPA files. Are there any affordable web service for testing IPA with a true emulator or real device? I'm asking this because Flash Builder doesn't provide a true simulator, it lacks essential API functions such as NativeWindow.

    Hello,
    thanksk so far. I can now create an ANE, hopefully it is correct...
    Now, while trying to use it in my mobile application, calling the Constructor of my SWC interface > call initNativeExtension() I get an:
    Type Error #1009 cannot access a property or method of a null object reference
    It seems that my code cannot load the ANE because I cannot instatiate the extension object.
    Can you help me ?
    THX
    marco    

  • Big ANE causes java.lang.OutOfMemoryError when packaging Air application

    Hi,
    I'm working on an Air mobile game that uses ANE on iOS and Android. I'm in the process of creating a new ANE and face a problem on the Android side.
    My ANE requires an external framework (Burstly, http://burstly.com). If I just link the Android project to Burstly's .jar file, I get errors in "adb logcat", like:
    I/dalvikvm(16074): Could not find method com.burstly.lib.BurstlySdk.init, referenced from method com.freshplanet.burstly.functions.InitBurstlyFunction.call
    In order to include Burstly's files in my own .jar, I unzip Burstly's .jar file and repackage them with my compiled code in a unique .jar (following advice on http://stackoverflow.com/questions/7732742/air-3-native-extensions-for-android-can-i-how-t o-include-3rd-party-libraries).
    Problem: Burstly's SDK includes thousands of files. It doesn't create any trouble when packaging the ANE, but when I try to package the Air application, I get the following error:
    dx tool failed:
    UNEXPECTED TOP-LEVEL ERROR:
    java.lang.OutOfMemoryError: Java heap space
              at com.android.dx.util.IntList.<init>(IntList.java:87)
              at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:174)
              at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
              at com.android.dx.ssa.back.IdenticalBlockCombiner.process(IdenticalBlockCombiner.java:74)
              at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:132)
              at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:76)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:103)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74)
              at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:269)
              at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
              at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
              at com.android.dx.command.dexer.Main.processClass(Main.java:299)
              at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
              at com.android.dx.command.dexer.Main.access$100(Main.java:56)
              at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
              at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
              at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
              at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
              at com.android.dx.command.dexer.Main.processOne(Main.java:247)
              at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
              at com.android.dx.command.dexer.Main.run(Main.java:139)
              at com.android.dx.command.dexer.Main.main(Main.java:120)
              at com.android.dx.command.Main.main(Main.java:89)
    I read that the solution to eliminate this error is to give Java the parameters "-Xms...M -Xmx...M", with "..." being a high-enough number. Note that I'm working on a machine with 8GB of RAM. I tried to package the app in command line to be able to pass these parameters:
    /usr/bin/java -Xms512M -Xmx4096M -jar "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/adt.jar" -package -target apk -storetype pkcs12 -keystore [...].p12 Main.apk Main-app.xml Main.swf -extdir "/Users/alex/Documents/Adobe Flash Builder 4.6/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/front-end-mobile/com.ado be.flexide.multiplatform.ios.platform"
    But when I run a "ps -ef | grep java", I can see that adt runs another Java program (dx) without transmitting my -Xms -Xmx parameters:
    /usr/bin/java -jar /Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/android/bin/dx.jar --dex --output=/private/var/folders/t9/3kw74cx14nv2xg9tgmx9m1jc0000gp/T/b5757d93-1e93-439c-8f6d -c93e4933f6f1/outputDEX.dex [... bunch of jars]
    Any idea to solve this issue?
    Thanks
    Alex

    I solved my issue by setting the _JAVA_OPTIONS environment variable. (Note: there are two underscores)
    I added the following line to my .bash_profile:
    export _JAVA_OPTIONS="-Xms1024m -Xmx4096m -XX:MaxPermSize=512m"
    Now everytime a Java program is launched from the command line, I see the following message:
    Picked up _JAVA_OPTIONS: -Xms1024m -Xmx4096m -XX:MaxPermSize=512m
    And my application packaging runs just fine now.
    I still have an issue though: this trick solved the problem for packaging the app from the command line, but the _JAVA_OPTIONS are not picked up when packaging from Flash Builder, so it still crashes there.
    Note that my Adobe Flash Builder 4.6.ini contains the following options:
    -Xms512m
    -Xmx1676m
    -XX:MaxPermSize=512m
    -XX:PermSize=64m
    1676m is the highest number I can put before Flash Builder refuses to launch. I'm not sure if these parameters are actually passed to the VM that runs de dx.jar program, or if it's just for the ActionScript compiler. But anyway my app packaging still crashes in Flash Builder.
    If someone knows a way to force Flash Builder to pickup the _JAVA_OPTIONS set in the command line, let me know :-)
    Thanks
    Alex

Maybe you are looking for

  • Can I install Windows XP with another CD than the recovery CD?

    A friend of a friend ;) has a Satellite 5200. He cached a very bad virus on his Notebook, witch I couldn't remove after 2 hours of work, so I'd like to install Windows in order to "clean" the system. The problem is: he is just for visit here, and his

  • Msi neo2 k8n 54g platium and 4 memory sticks problem

    Hello i used to be running with 2x 512 geil ddr 550mhz ultra ddr ram, and got a deal at my friends pc store, about 2x 512 geil ddr 500 ultra set ddr ram, but when ever i put the 2 new stics in my pc it dossent even give me a screen, i just  powers op

  • Pdf's created in Illustrator appear lighter in Adobe Reader

    Hi I've been using Illustrator for a few years for web design and print graphics, fliers etc. I have noticed that when i save a design as a pdf in illustrator then open the pdf in adobe reader the colours all appear lighter than they should be and pr

  • PLSQL Code for Substracting / Reducing Quantity

    Hi All I have two tables Cash and Product. Cash table has cash related sales in it. Product has product information in it. End user selects the products and specifying their quantity in cash form then saves it. The quantity must be reduced or deducte

  • When I call gotoAndStop(3) it plays the sounds in frame 2?

    Hi all, I have a problem, I'm creating a game for android using flash CC and I have a level on each frame but when I go to choose level frame and click on a button that takes me to a frame it pass by the in between frames I do not know why, I have no