Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Regular Contributor
juszczec2
Posts: 59
Registered: ‎05-10-2012
My Device: 8800

BlackBerry 10, Adobe AIR, Flex and no QNX

Hi folks

 

I've been working with AIR for exactly 1 week and a day, so I'm a newbie.

I want to develop an app in AIR and have it run on both the desktop and BlackBerry 10.  I want to reuse as much of the same code as I can.  I want it to ONLY use spark and mx elements.

I have created a simple AIR app, here is the mxml file:

 

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                       xmlns:s="library://ns.adobe.com/flex/spark"

                       xmlns:mx="library://ns.adobe.com/flex/mx"

                       xmlns:qnx="library://ns.adobe.com/flex/qnx"

                       visible="true

                       width= "500" height="500" >    

    <fx:Declarations>       

    </fx:Declarations>

       

    <fx:Script>

    </fx:Script>

 

 

    <mx:Button label="Close" click="stage.nativeWindow.close()" x="0" y="0" visible="true"/>

    

    <s:Button label="Convert" x="10" y="10" visible="true"/>

 

</s:Application>

There is nothing else to this app.  Just the mxml file.  When I run it in the simulator, all I get is a white window.  No buttons, no errors, nothing - just a white window.

I've been thru the forums and used my google-fu, I have NOT seen anything that says you cannot do this.  So, I'm hoping I've got something missing from my mxml file.

Is anyone running an AIR app that does not contain any of the qnx elements and ONLY contants mx & spark elements on BlackBerry 10?  Can you post a sample mxml file?  Were there any special settings you had to use in FDT or when setting up the run configuration?


Mark

Please use plain text.
Contributor
bobbydriscol
Posts: 23
Registered: ‎05-04-2012
My Device: Playbook, 9670, 9800, 9350

Re: BlackBerry 10, Adobe AIR, Flex and no QNX

The SDK package might be messed up and you'll need to rebuild the SDK folder using a Flex 4.x/Air 3.1 version of the SDK as the base package. Then install the BB SDK using that Flex SDK folder as the base and don't integrate with Flex but point to that SDK in the add SDK properties.

 

Often the white screen is related to the common issue of an unsupported SDK version of AIR (3.1 is the maximum for BB10 currently -- looks like a future version will use 3.4).

 

For your desktop version, for most compatibility you should build using 3.1 as well for the AIR compiler. 

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BlackBerry 10, Adobe AIR, Flex and no QNX

BB controls do not support MXML, only AS3.  Try taking the name splace out of the Application paths to see if that helps.  Short answer is yes, you do not have to use the BB controls, but you will need to skin and size the Spark and Mx controls to the screen density.  Best not to mix Spark and Mx controls.  Use Spark for new projects.

 

You probably dont have something set properly in your project if you are getting the white screen.

Please use plain text.
Regular Contributor
juszczec2
Posts: 59
Registered: ‎05-10-2012
My Device: 8800

Re: BlackBerry 10, Adobe AIR, Flex and no QNX

Thank you both for the replies.

 

In the end, it turned out I had my environment incorrectly configured.  I was mixing and matching the BB AIR SDK and the Flex 4.6 I installed elsewhere on my system.

 

 

Please use plain text.
New Contributor
dwelch
Posts: 3
Registered: ‎05-21-2013
My Device: 10

Re: BlackBerry 10, Adobe AIR, Flex and no QNX

I have a rather extensive app that is currently on Apple and Android stores that is a Flex app (4.7) and uses strictly Spark components that works great on the BB10. Little porting effort required.

Please use plain text.