Threading in Flex 4.5 mobile projects

Hello fellow developers,.

as the topic I'm looking for a way to implement threading in a project mobile flex 4.5. As I did some research on the web, I saw that standard thread is not available in flex projects, yet there are several ways to treat this problem. Still, I could not understand fully these means, or how to implement them. Here is a preview of my project that I'm working on.

The project will include several screens (views).

  • A 2 way messaging screen
  • Creation of dynamic forms, filling in and sending
  • Navigation (not online, works with a local mapping file)
  • EcoDrive (will work from a shared dll)
  • Parameters

At present, the project is with Visual c# (VS 2008) on a Windows CE 5.0 platform. current platform uses door RS232 (serial) for communication with a GPRS device, which is connected to our servers. so the device is not a full internet connection, yet a limitted and access controlled to our servers only via its port series.

now, I want to implement and change it to Flex, to make it work on Android and iOS devices. So far so good.

the problem is, in my project to winCE, there are various threads dealing with the serial communication (check if any data buffer series, check if there is a package to send in db, etc.), managers of databases etc.

I found a way to use communication series with my android device, I want to go to. Yet, as you can see, i need at least 1 different thread to handle communication series while the main functions of the program works without pause or delay.

I hope that I have defined my clearly, needs to receive a helpful response from family Flex.

with best regards,.

I don't build UIs using Java (or), so I'm not the right person to help.

I see that you have received in your other thread a few interesting tips and a suggestion - use a server socket as a bridge to non-flex software. I think about this possibility.

All said, Java looks like your easiest option.

Tags: Flex

Similar Questions

  • universal support iOS and CSA 2.0. It will affect Flex Mobile projects?

    Hello

    Regarding the latest release notes for AIR 16, it says

    "The legacy compiler is not (and will not) compatible with iOS 64-bit." [...] It will be removed with the 16 of the AIR SDK version"

    I'm a little lost with what it means for Flex Mobile (4.6 or Apache Flex SDK). We will always be able to compile once AIR 16 is released or this new compiler will be the issue with Flex compiled for iOS projects? Must make us changes on existing applications in Flex?

    Thanks for your clarification,

    Fabien

    It seems that this evil is rumor spreading around... a lot of people don't bother research properly.

    When they talk about the legacy compiler, they speak of the ADT, MXMLC will continue to work. Simplified IPA packaging process is: Source code - MXMLC / ASC2---> SWF - ADT AOT compiler---> IPA

    So with AIR 16 ADT -useLegacyAOT argument is removed.

  • Scaling Flex Mobile project with iPad Retina display (3rd generation).

    Adobe and al.,.

    With the new iPad 3 we have now a ton more pixels to use. I know well and have already tested AIR 3.1 + compiler command line option (-platformsdk) for the Retina display on the new iPad. In ActionScript projects mobile, the content is rendered beautifully on the new iPad. But with Flex Mobile projects, something happens that forces him to render incorrectly. It is the retina-fine screen, but the size is too small.

    Here is a picture WITHOUT the construction tag - platformsdk, which causes the application to be doubled to fit on the new iPad to pixel:

    FB_Non_Retina.PNG

    Note that it is scaled proportionally, even while the text and the items are a bit pixelated. Not a big deal, but noticeable on the device.

    This image is taken with the rendering of the app to the retina (the platformsdk - pointing to iOS SDK 5.1 setting):

    FB_Retina.PNG

    As you can see, text components are made really clear, but the scale is far away. Obviously, it's getting the width of 2048 x 1536 of the device, but it is much too small.

    How can I fix it? I tried to change the applicationDPI, but it doesn't fix it. Setting a width/height of 1024 x 768 has nothing either. It seems that we have to overrride a behavior that causes all so small adjustment.

    A little help?

    Thank you

    iBrent

    Richard Lord posted a blog yesterday using the iPad screen retina with Adobe Air and one of the things I noticed is that the new iPad returns a 132 DPI, the specs say that the device is 264 ppi. I don't have one of the new iPads, so I can't test this, but it seems that it is just a case of the return the wrong DPI device which is something that has happened before. I could check the section to this page titled "substitute the default DPI" and see what happens if the device return 240 when running on the new iPad.

  • Flex mobile project - ant build number

    Hello

    I get an error when I compile my mobile project with the Ant build script. "Could not resolve < s:ViewNavigatorApplication > to a component implementation". But, I use the same build file to generate a project mobile simple helloworld that works very well.

    < mxmlc

    file = "${main_class}".

    output = "${output_loc}".

    local = "${LOCAL}.

    static-RSLS = "false".

    accessible = "false".

    ConfigName = "airmobile.

    Debug = "${debug_mode}.

    FailOnError = "true".

    fork = "true".

    MaxMemory = "512 m" >

    < path-element source-path = "${class_path}" / >

    < compile .library-path dir = "${FLEX_HOME} ' / managers ' append ="true">"

    < name = "libs / *" / >

    < / compile .library-path >

    < path to library dir = "${FLEX_HOME} / frameworks / local / ${LOCAL} ' append ="true"/ >"

    < library dir = path "${lib_path} ' includes ="*.swc"append ="true"/ >

    < file external-library-path = "${AIR_GLOBAL}" append = "true" / >

    < compile .library-path dir = ' D:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/MobilityServer/WEB-INF/flex/libs/air ' includes = "airfds.swc" append = "true" / > "

    < compile .library-path dir = ' D:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/MobilityServer/WEB-INF/flex/libs ' includes = "fds.swc" append = "true" / > "

    < compile .library-path dir = ' D:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/MobilityServer/WEB-INF/flex/libs ' includes = "fiber.swc" append = "true" / > "

    "< dir="C:/Perforce/mobility/main/NextGen/client/libraries/external/robotlegs/1.4.0/bin compile .library-path "includes =" robotlegs Framework - v1.4.0.swc "append ="true"/ >

    < compile .library-path dir = includes "C:/Perforce/mobility/main/NextGen/customer/libraries/CommonMobileLibrary/bin" = "CommonMobile.swc" append = "true" / > "

    < compile .library-path dir = includes "C:/Perforce/mobility/main/NextGen/customer/libraries/NativeMobileLibrary/bin" = "ASNativeLibrary.swc" append = "true" / > < / mxmlc > "

    Post edited by: betheflexcoder

    Looks like you are missing mobilecomponents.swc

  • Error during execution of a newly created mobile project

    Hello

    Whenever I have create a new mobile project in Flash Builder and try to run it I get this error message:

    TypeError: Error #1009: cannot access a property or method of an object null reference

    Conference.

    at com.coursevector.flashbug::Profiler/allCompleteHandler()

    [SWF] NoteTakerMob.swf - 2 698 930 bytes after decompression

    I get this when I try to compile against Flex SDK 4.5 and 4.5.1 and regardless of the type of mobile application, I'm trying to create, by the basic view example, based view tab or empty.

    Anyone know what may be the problem?

    Stephen

    Found the cause of the problem, its FlashFireBug in Mozilla. When a swf file is launched FlashFirebug trying to capture the SWF, this mess mobile applications running on the desktop.

    Found the answer in this post: http://forums.adobe.com/thread/852612

  • error 'BlackBerry Tablet OS SDK 0.9.4 for Adobe AIR does not support mobile projects."

    Hello

    I installed Adobe Flash Builder Burrito and Blackberry Tablet OS SDK 0.9.4 on Windows 7. When I start to create a new project by selecting the ' New/ActionScript Mobile Project' menu, then in the new dialog box project of Mobile of ActionScript, I give a project name, and then choose 'BlackBerry Tablet OS SDK 0.9.4 for Adobe Air. At this point, the 'Next' button is gray on an error message on top as "BlackBerry Tablet OS SDK 0.9.4 for Adobe AIR does not support mobile projects.". Is there something that I am missing?

    I read somewhere someone comlains error message "BlackBerry Tablet OS SDK 0.9.4 for Adobe AIR support not projects mobile." occurs after installing Blackberry Tablet OS SDK 0.9.4 while there is no problem with Blackberry Tablet OS SDK 0.9.3. If it is true, where can I download Blackberry Tablet OS SDK 0.9.3?

    Thank you very much in advance,

    John

    @johnwneg, make sure that when installing FB Burrito, you:

    (1) run the installer as administrator.

    (2) select English International rather than NA English.

  • ActionScript Mobile project with command line

    Hey guys, trying to figure out how to compile a project originally created in Flash Builder 4.7 as ActionScript Mobile project with the command line. I found mxmlc and that seems to be exactly what I need, but it seems that take a .mxml file and with this type of project, no .mxml was generated by Flash Builder.

    Am I supposed to just create it manually? I hope there is an easier way because the long-term goal is to continue to work with Flash Builder for development and then use the command line to actually deploy the final product and I don't want to have to manage a .mxml file.

    Any suggestions? I need the instructions for Windows - thank you!

    The solution was to use the - dump-config inside Flash Builder parameter and then use it to pass as an argument to mxmlc with the - load-config parameter. Thank you guys

  • Import of Flash Catalyst Flash Builder as a Mobile project

    I'm trying to create an application in Flash Catalyst CS5 and then import it into Flash Builder 4.5 to create an application mobile ios.

    However, when I try to import the catalyst, it does not define as a mobile application and we finished a web application. Is there a way I can convert it into a mobile application?

    Kind regards

    Nico.

    Which is not supported currently, you must move the files manually in the web project in the mobile project.

    Thank you

    -Sunil

  • Thread in Flex RIA?

    Hi all
    Is there any concept of thread in Flex RIA? I am writing a photo album application. How can I do the download fotos, while the user can touch one another foto at the same time?
    Thank you very much!

    There is no class of thread like java in as3 but server request are not handled async, so you can make calls to the server without blocking the user (in fact it is the concept of asynchronous web, RIA)

  • What can I use if I need the htmlText property in Flex Mobile project

    Hello

    What control exposes a property htmlText in Flex Mobile? MXML or AS3, is not serious.

    Does that help?

    http://help.Adobe.com/en_US/Flex/mobileapps/WS19f279b149e7481c-3c2dbaa612bb06a5ea2-8000.ht ml

  • Flash Builder 4.6 Mobile project using Blazeds &amp; Extension Native

    Hello

    I'm building a Flex Mobile in FB project, which uses BlazeDS to access data through a project of spring and also a DONKEY file to access the contacts of the device.  I want to debug the application on a device connected with a USB cable, so to put my root files and output in the settings of the server using a UNC name, so it can be found from my device via my wifi network. I also added the native extension via the Build Path and package labels.  When I have an emulator debug office, things are OK and the extension correctly tells me that he is not taken in charge on the emulator. However, if for debugging on the device, FB throws an exception during the launch, complaining of a java null pointer exception.  The journal of the eclipse, in part, looks like this:

    com.adobe.flexbuilder.project.AbstractXMLModel$ FileReadException: org.eclipse.core.internal.resources.ResourceException: resource ' / NewOne-debug/NewOne - app.xml "does not exist.

    to com.adobe.flexbuilder.project.air.internal.xml.ApplicationXMLModel. < init >(ApplicationXMLM odel.java:102)

    at com.adobe.flexbuilder.project.air.AppXMLCreator.init(AppXMLCreator.java:91)

    to com.adobe.flexbuilder.project.air.AppXMLCreator. < init > (AppXMLCreator.java:80)

    to com.adobe.flexbuilder.project.air.AppXMLCreator. < init > (AppXMLCreator.java:73)

    at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.getAppXMLCreator (AppXMLFileANEExtensionHandler.java:153)

    at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.retainExtensionI ds(AppXMLFileANEExtensionHandler.java:315)

    at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.modifyAppXMLforPackaging (ANECont roller.java:371)

    at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.modifyAppXMLforPackaging (ANECont roller.java:338)

    at com.adobe.flexbuilder.project.ui.utils.ANE.AbstractANEPackageHandler.modifyAppXMLforPacka ging(AbstractANEPackageHandler.java:91)

    at com.adobe.flexide.launching.multiplatform.launchhandlers.AbstractMultiPlatformLaunchHandl er.applyNativeExtensionDetails(AbstractMultiPlatformLaunchHandler.java:164)

    at com.adobe.flexide.multiplatform.android.launching.ADBLaunchHandler.doPackage (ADBLaunchHan dler.java:424)

    at com.adobe.flexide.multiplatform.android.launching.ADBLaunchHandler.launch (ADBLaunchHandle r.java:250)

    at com.adobe.flexide.launching.multiplatform.MultiPlatformLaunchDelegate.launch (MultiPlatfor mLaunchDelegate.java:191)

    at com.adobe.flexide.launching.AbstractFlexLaunchDelegate.launch (AbstractFlexLaunchDelegate. java: 244)

    at com.adobe.flexide.launching.AbstractFlexLaunchDelegate.launch (AbstractFlexLaunchDelegate. java: 134)

    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)

    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)

    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)

    to org.eclipse.debug.internal.ui.DebugUIPlugin$ 8.run(DebugUIPlugin.java:1132)

    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    Caused by: org.eclipse.core.internal.resources.ResourceException: resource ' / NewOne-debug/NewOne - app.xml "does not exist.

    at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:320)

    at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194)

    at org.eclipse.core.internal.resources.File.getContents(File.java:287)

    at org.eclipse.core.internal.resources.File.getContents(File.java:278)

    to com.adobe.flexbuilder.project.air.internal.xml.ApplicationXMLModel. < init >(ApplicationXMLM odel.java:100)

    ... 19 more

    I guess the problem is that when the application attempts to run on my device, the extension is not find application descriptor file.  Is there anything else I need to do?

    I appreciate all help.

    Jay

    Here is the solution in case anyone else runs into this problem.  Flash Builder is to create the deployment at the launch, it converts the path mapped to a local path mutilated for donkey find the descriptor to a relative path, which can not be found and get the null pointer.  Making the path to output folder actually local to the computer, as opposed to the default which creates FB, solves the error and still lets blazeds access from the device.

  • Flex 4.6 mobile forms

    It doesn't seem to be a lot of discussion on the lack of support of mobile form in a mobile apps Flex 4.6 - someone has any suggestions as to what is the best place to start on a several pages/view running form?

    As far as I can tell from the AS3 documentation - < s:Form > can run on a mobile device - IF you develop your own mobile skin.

    I would have thought there would be an outcry to the lack of support of mobile form - but as far as I can tell by googling and research official Adobe Evangalist Articles - well nobody seems to need or want to mobile forms?

    Am I alone here? Once more, any suggestions on the development of views multiple forms covering?

    You can use the built in UNITS.

  • Flex 4.6 Mobile Scrollbar optimization prevents the scroll position layout?

    Hi all

    With the release of flex 4.6, it seems that the mobile version of the wheel has been optimized. Now the wheel differs from creation of the scroll bar until the user interacts with scrolling... That all sounds good performance wise, faster page creation etc...

    But if I want to return to the position of the wheel before the user has interacted with the subject, IE to access particular viewpoint before you start to scroll, I don't know what to do. Initially I would have something like... myScroller.horizontalScrollBar.value = 100... but courses myScroller.horizontalScrollBar now has the value null.

    Am I missing something - y at - it another way.

    J

    OK found a work around...

    I extended the scroller class and added a few features such as...

    public function scrollerCreateHScrollBar (): void

    {

    If (! this.horizontalScrollBar & this.horizontalScrollBarFactory)

    {

    this.horizontalScrollBar = HScrollBar (this.createDynamicPartInstance ("horizontalScrollBarFactory"));

    Group (this.) Skin). AddElement (this.horizontalScrollBar);

    partAdded ("horizontalScrollBar", this.horizontalScrollBar);

    }

    }

    then called to create bars of the amine, when I want to that they...

    Hurra.

    J

  • Multi threading in flex concept?

    Hello

    I have an application with 4 quandrants. Each name separate webservice and based on the data in result I get, I build user interface elements dynamically. Unfortunately, I have to wait for each manager result in order to complete the construction of the user interface. Is it possible to run all 4 result together managers?

    Ex:

    I have 4 webservices: ws1, ws2, ws3 and ws4. I pass some parameters and invoke these services, complete creation:

    WS1. OperationName.Send ();

    WS2. OperationName.Send ();

    WS3. OperationName.Send ();

    WS4. OperationName.Send ();

    ws1ResultHandler(event:ResultEvent):void

    {

    }

    ws2ResultHandler(event:ResultEvent):void

    {

    }

    ws3ResultHandler(event:ResultEvent):void

    {

    }

    ws4ResultHandler(event:ResultEvent):void

    {

    }

    From the Web service operation which is managed to get the first data, this particular manager fires. Once all of the code in this handler is executed, she then gets in the next operation of webservice result handler.

    Is there a way to trigger all these handlers together and build together dynamically user interface elements at once?

    Appreciate your ideas on this.

    "Is there a way to trigger all these handlers together and build the UI together dynamically at THE SAME time?"

    Excuse my small edit, but the answer is 'no '. Flex is not multi-threaded.

    You can look at why it takes so long to build the user interface as a problem.

  • Mobile project database, SQLite, replaced when the application starts

    It is a mobile application for Android. I created a small database in which I want to store the user's preferences. Unfortunately, the database is deleted whenever the application is started in debug mode. This happens without code running at all.

    The other strange thing is the database then gets recreated when my complete Manager of creation came, before a single line of code is executed. You can see in the code depending on whether it is where I start to use the database, but then again, the database is being destroyed and recreated before this code is reached.

    Result: I lose anything stored in the database.

    Any ideas why this happens?

    <? XML version = "1.0" encoding = "utf - 8"? >
    < s:View xmlns:fx = "http://ns.adobe.com/mxml/2009".
    xmlns:s = "library://ns.adobe.com/flex/spark".
    title = "HomeView.
    creationComplete = "view1_creationCompleteHandler (event)" >

    Remove creationComplete property, above and then just by running the application in debugging removes the database stored, without executing the function below.


    < fx:Script >
    <! [CDATA]
    Import mx.events.FlexEvent;
    public var sqlc:SQLConnection = new SqlConnection ();
    public var db:File;

    If this function is entered, the "Local Store" folder (under the applicationStorageDirectory),
    and the database are deleted.

    protected function view1_creationCompleteHandler(event:FlexEvent):void {}

    stopping the trace statement following will always be to re-create an existing database.
    even if end you the session of debugging is stopped at this point.
    trace();

    DB = File.applicationStorageDirectory.resolvePath ("MyDatabase.db");
    Add the new headphones for attempting to open read/write:
    sqlc.addEventListener (SQLEvent.OPEN, open_db_read_write_RESULT_event_handler);
    sqlc.addEventListener (SQLErrorEvent.ERROR, open_db_read_write_ERROR_event_handler);
    sqlc.openAsync (db)
    }

    private void open_db_read_write_RESULT_event_handler(event:SQLEvent):void {}
    trace();
    Remove the headphones:
    sqlc.removeEventListener (SQLEvent.OPEN, open_db_read_write_RESULT_event_handler);
    sqlc.removeEventListener (SQLErrorEvent.ERROR, open_db_read_write_ERROR_event_handler);

    }

    private void open_db_read_write_ERROR_event_handler(event:SQLErrorEvent):void {}
    trace();
    Remove the headphones:
    sqlc.removeEventListener (SQLEvent.OPEN, open_db_read_write_RESULT_event_handler);
    sqlc.removeEventListener (SQLErrorEvent.ERROR, open_db_read_write_ERROR_event_handler);
    }
    []] >
    < / fx:Script >
    < fx:Declarations >
    <! - Place non-visual elements (e.g., services, items of value) here - >
    < / fx:Declarations >
    < / s:View >

    Flash Builder 4.5.1

    Win 7

    My path applicationStorageDirectory, where the database are created/retained:

    C:\Documents and Settings\MyName\AppData\Roaming\testSQL.debug\Local store

    Configure the run/debug panel uncheck the "clear the data application on each launch.

Maybe you are looking for