Flex mobile 4.6 app works inside flash builder but not in android emulator

Originally posted on stackoverflow: http://stackoverflow.com/questions/8663892/flex-mobile-4-6-app-works-inside-flash-builder- but-not-in-android-emulator
I have a basic flex mobile 4.6 app and it works fully fine in the flash builder built-in emulator using an android device profile like aria...
It also launches fine in the android emulator but one particular view shows blank (and this view works fine in flash builder).
Before I get in to many details of the view are there any categorical gotchas that can be causing this?
I can't seem to get the trace statements from the app to show in 'adb logcat'. It seems I need to compile a debug version of the apk but I don't know how to do this. I use the 'Export Release Build' from the Project menu in flash builder and it doesn't seem to have an option for debug=true.
The problematic/blank view basically uses the stagewebview and iotashan's oauth library to call linkedin rest apis... A different (and working) view can make restful web service calls in the emulator fine, so it doesn't seem to be an internet permission.
The source code contained in the problematic/blank view is almost identical to the tutorial found at:http://www.riagora.com/2011/01/air-and-linkedin/
The differences are: a) The root tag is a View b) I use StageWebView instead of HtmlContainer c) I use my own linkedin key and tokens.
I would appreciate it if someone can provide me with some pointers on how to troubleshoot this situation. Perhaps someone can tell me how to debug the app while running in the emulator (I think I need the correct adt command arguments for this which matches the 'Export Release Build' menu but adds the debug param?)
Thanks for your help in advance.
Comment Added:
I suspect that this has to do with connections to https:// api.linkedin.com and https:// www.linkedin.com. The only reason I can think of that the same code is not having issues inside of Flex Builder but indeed having issues in the Android emulator is something to do with certificates. Any ideas?

Thanks er453r,
I have created a project that clearly reproduces the bug.  Here are the steps:
1) Create a UrlLoader and point it to https://www.google.com (HTTPS is important because http works but HTTPS does not)
2) Load it
3) Run in Flash Builder 4.6/Air 3.1 and then run in Android emulator.  The former works with an http status 200.  The latter gives you an ioerror 2032.  I am assuming what works in Flash Builder is supposed to work in the Android Emulator and what what works in the emulator is supposed to work in a physical device (plus or minus boundary conditions).
I see a certificate exception in adb logcat but not sure if it's related...
Here is the self contained View code which works with a TabbedViewNavigatorApplication:
<?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"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:ns1="*"
                    xmlns:local="*"
                    creationComplete="windowedapplication1_creationCompleteHandler(event) "
                    actionBarVisible="true" tabBarVisible="true">
          <fx:Script>
                    <![CDATA[
                              import mx.events.FlexEvent;
                              protected var requestTokenUrl:String = "https://www.google.com";
                              protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                                        var loader:URLLoader = new URLLoader();
                                        loader.addEventListener(ErrorEvent.ERROR, onError);
                                        loader.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
                                        loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
                                        loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatusHandler);
                                        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                                        var urlRequest:URLRequest = new URLRequest(requestTokenUrl);
                                        loader.load(urlRequest);
                              protected function requestTokenHandler(event:Event):void
                              protected function httpResponse(event:HTTPStatusEvent):void
                                        label.text += event.status;
                                        // TODO Auto-generated method stub
                              private function completeHandler(event:Event):void {
                                        label.text += event.toString();
                                        trace("completeHandler data: " + event.currentTarget.data);
                              private function openHandler(event:Event):void {
                                        label.text +=  event.toString();
                                        trace("openHandler: " + event);
                              private function onError(event:ErrorEvent):void {
                                        label.text +=  event.toString();
                                        trace("onError: " + event.type);
                              private function onAsyncError(event:AsyncErrorEvent):void {
                                        label.text += event.toString();
                                        trace("onAsyncError: " + event);
                              private function onNetStatus(event:NetStatusEvent):void {
                                        label.text += event.toString();
                                        trace("onNetStatus: " + event);
                              private function progressHandler(event:ProgressEvent):void {
                                        label.text += event.toString();
                                        trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
                              private function securityErrorHandler(event:SecurityErrorEvent):void {
                                        label.text +=  event.toString();
                                        trace("securityErrorHandler: " + event);
                              private function httpStatusHandler(event:HTTPStatusEvent):void {
                                        label.text += event.toString();
                                        //label.text += event.responseHeaders.toString();
                                        trace("httpStatusHandler: " + event);
                              private function httpResponseStatusHandler(event:HTTPStatusEvent):void {
                                        label.text +=  event.toString();
                                        trace("httpStatusHandler: " + event);
                              private function ioErrorHandler(event:IOErrorEvent):void {
                                        label.text +=  event.toString();
                                        label.text += event.text;
                                        trace("ioErrorHandler: " + event);
                    ]]>
          </fx:Script>
          <fx:Declarations>
                    <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:Label id="label" y="185" width="100%" color="#0A0909" horizontalCenter="0" text=""/>
</s:View>

Similar Messages

  • Some games and apps work on nokia n8 but not on no...

    i have a nokia c7 and i just went to the ovi store to download need for speed shift HD but it said that it was not available for my set but when i set the phone as n8 it said your phone is set
    why? they both have same os and almost the same hardware with the 3d accelerometer and all
    the RAM is same the graphic capeabilities of both phones are same thenwhy and this not only for this game for a number of apps

    699taha wrote:
    Hello did you try to download the game? CAN YOU DO THIS FOR ME PLEASE? just set your phone as n8 send the link of the game to your phone and try to download and then run it THANK YOU!!!!!!..... PLEASE TELL ME IF WORK OR NOT
    Need for Speed Shift is now available in Ovi Store for C7. It is named NFS Shift instead, and unfortunately, it is not free.
    IMO, Need for Speed Shift is free only for N8 was as a form of sales marketing technique to differentiate the product (N8, as an Nseries is suppose to be a flagship device anyway) from other Symbian^3 devices. I'm not sure why they can't launch paid version of NFS for C7 earlier, probably technical issue maybe. I wanted to buy but I bought GT Racing instead, since it is available from the beginning.
    I faced similar issue that certain apps are available to N8 but not to C7, you can email Ovi support to ask them why, basically I forgot what they replied me lol.

  • Native Process running from Flash Builder but not from the installed exe

    I have created an AIR application to launch a native process. The   application works fine when tested in Flash Builder but doesn't runs   when I create and AIR  installer and run the installed exe. Any idea  what might be wrong?

    Have you created a native installer instead of just an AIR file.
    -ted

  • Works in Flash player but not from Browser

    I know this has shown up in the forum before but I must be using the wrong search terms because I can't find it.
    I've created a Flash file that reads from several different xml files and displays them when requested. When I run the Flash player, (by pressing Command-Space within Flash), it all works flawlessly. But when I open it within a browser, only one of the xml files loads, the other two just spin away on the preloader.
    I have another Flash file that is doing the same thing. A click on a scrolling new list should take you to another web page. In Flash Player it works fine, but from a Browser nothing happens.
    Anyone know why this is?
    thanks

    As odd as it may seem, the tip-off to the problem may be:
    " When I run the Flash player, (by pressing Command-Space within Flash), it all works flawlessly"
    If any of your Flash assets are in a different folder than the HTML Web page... then testing the .swf directly like that should NOT work!
    It's most likely a pathing issue:
    Pathing issues
    Almost always when it works on the local machine and not the server, it's a pathing problem.
    You can put your Flash related files in whatever folders you want, they do NOT have to be in the root, they do NOT all have to be in the same folder. But if you have a problem and if sticking them all in the root folder works, then you know that the issue was a pathing problem.
    Just remember that paths used in the .swf become relative to the Web page on which the .swf is placed, NOT it’s physical location.  So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root folder, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, images, video, etc), the path used inside the .swf to load the .xml file has to be relative to it's new location in root and then back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
    In fact if you are placing the .swf on a web page in a different folder than the .swf is stored in, and that .swf calls external assets, then direct clicking and opening of the .swf in it’s folder should NOT work! That’s because the paths to the external assets should be relative to the Web page and not the physical location of the .swf.
    So just be sure that you use addresses relative to the final Web page locations (not physical file locations) and you can put the Flash related files in what ever folders you want.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    Best wishes,
    Adninjastrator

  • Apps work in one location but not another

    Some apps (iheartradio and tvguide) work fine from my home wifi, but not in another wifi area (at work, which has better wifi).  Other apps such as pandora work fine at both locations.  What is the difference and how can I get all apps to work everywhere?

    It's entirely possible that your employer has blocked certain ports on the corporate firewall, which will prevent some apps from working.

  • Scroll script works in Flash 6, but not in 9

    I have a simple scroller script that works fine for scrolling
    a movieclip in Flash 6, but when I publish in anything later, it no
    longer scrolls. Both are set to AS2. Is there an obvious reason
    that anyone can see of why this should be? When I test the script
    syntax in the actions panel, it says there are no errors in the
    script. By tracing I can see that there's no trouble with targeting
    the up and down buttons or scroll slider, and the slider still
    drags, but the content MC doesn't move as it should. Thank you very
    much for your help, in advance. Here's the script, in case the
    answer isn't obvious from the description:

    You were right! It works now, even as posted above. I just
    remembered I had fixed an upper/lower case inconsistency just for
    neatness since I last tested, never thinking that would fix the
    problem! I just tested again and to my surprise, it works great. I
    guess neatness does count!!! Thanks again, kglad!

  • LoadMovie working in Flash Player, but not when posted online

    I have built a website
    utilizing Dreamweaver and Flash. This page:
    http://www.tonystubbs.com/print.html
    has a link under "print" called "catalog". It is supposed to load a swf file when clicked. It works when I view it in Flash Player, but when I import it into Dreamweaver and post it, it isn't working.

    It is likely an issue with file location/targeting since you appear to be loading the swf into the html page from a separate folder.  When you do that, any files that the swf file loads need to be targeted as if that swf is in the same folder as the html file.  So if your other swf is also in the images folder, then when you specify to load it in the Flash file you need to include the images folder in the path.

  • Works in Flash preview, but not on webpage?

    I'm using this code to externally load a .swf into my site. I made sure all the files were uploaded. I'm sure, because I can even find the .swf on the site, it just won't show up on the main page. (for example, I can find it at www.mysite.com/flashfolder/animation.swf, but not in it's place at www.mysite.com)
    Here's the code I'm using:
    createEmptyMovieClip("anim", 0);
    anim.loadMovie("animation.swf");
    anim._x = 156;
    anim._y = 515;
    It's inserted into the actions panel of a new layer in the main Scene 1 timeline in my .fla project. It works when I preview it (ctrl+enter), but when I upload everything to the site, it doesn't show up?
    Anyone know what may cause/why this is happening?
    Thanks for your help in advance!

    Is the file that is loading animation.swf also in the same folder?

  • Office Web Apps - working in other browsers but not Internet Explorer

    Hi there,
    I have office web apps on my SharePoint 2013 environment.  The previews work file when hovering next to a document but if I try to open it, I get "Sorry, we ran into a problem".  It looks as though Excel files open okay but I
    have tested Word and Powerpoint documents and I get this error.  Also, it only appears to happen in Internet Explorer - Google Chrome and Firefox are okay.  Any ideas?

    Thanks for the advice.  I installed the hoftix (on the OWA server) and now it appears to really be broken - nothing is opening using office web apps anymore.
    I found this blog with the same errors I am getting - I'm guessing I will need to uninstall etc. too?? 
    http://blogs.technet.com/b/dodeitte/archive/2013/03/29/issue-with-automatic-updates-enabled-amp-office-web-apps-server-2013-update.aspx

  • Flex Plugin that calls Webservice works in Internet Explorer but not firefox

    I created a simple flex plugin that consumed a web service i
    built and was working with it locally. I uploaded the files to the
    server, and when i test the file out in internet explorer, the
    plugin loads great. However when firefox or any other browser
    attempts to load the same file i get "Http Request Error"? I've got
    a crossdomain.xml loaded up.. here it is:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy
    SYSTEM "
    http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="*" secure="false" />
    </cross-domain-policy>
    Any ideas? Thanks. I should note that the webservice and the
    plugin are both on the same domain.

    I was playing around some more, when i yank the
    crossdomain.xml, both browsers display a security error, but when i
    put it back in, internet explorer is happy but firefox still spits
    out "Http Request Error"

  • App working in preview/ADL but not working in .app

    Hi, so I've been testing my code with the preview in
    Dreamweaver and also using the ADL terminal command on my Mac at
    work and the app I've been coding works really well when testing
    through either of those two testing interfaces. But when I actually
    create the .air file and install it, my app just hangs at my
    loading screen. Is there anything specifically that would cause
    this? I can post the code if someon needs it.

    Could your app. write out a log file to find out exactly when
    it hangs?
    -ted

  • Flash works in Flash editor but not when puiblished

    Hi
    I have got my flash working fine in the editor but when I
    publish it, neither opening it in IE from the hard drive, nor from
    the internet works.
    The animation works fine, but there should be images loaded
    onto the animated squares and there's not.
    Any thoughts?
    Thanks

    LLuis12 wrote:
    > Hi
    >
    > I have got my flash working fine in the editor but when
    I publish it, neither
    > opening it in IE from the hard drive, nor from the
    internet works.
    >
    > The animation works fine, but there should be images
    loaded onto the animated
    > squares and there's not.
    My guess is your paths are wrong to the loaded content. Done
    for local view
    not for html. Make sure the paths to files are a ok.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • XNA app works on 8.1 but not 7.1

    Hello all,
       Weird happenings here, I have an xna game app that I rebuilt in visual studios 2013 ultimate edition and deployed it on windows phone 8.1 emulator with no issues, so it had worked on 7.1 and I assumed it still would, but when I submitted my
    app, it passed certification and then later today I got the email that it doesn't work with 7.1 devices, put the app in vs 2012 and sure enough it crashed on 7.1 devices, just wondering has anyone had this happen before and what would be the cause. The issue
    I am having is that I created custom content processors for some xml files and they are not being seen on 7.1 devices but they are being seen on the 8.1 devices......
    Any help is appreciated.
    Thanks
    Allen
    [email protected]

    Hi Allen,
    If I'm not misunderstanding, you mean that after rebuilding a WP7.1 project in Visual Studio 2013 Ultimate, this app will crash on WP7.1.
    >>The issue I am having is that I created custom content processors for some xml files and they are not being seen on 7.1 devices but they are being seen on the 8.1 devices
    Could you please clarify this issue?
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.
    Yes sir, that is exactly what I am saying.
    [email protected]

  • YouTube app works on iPhone 5 but not iPad Air. Keeps saying playback error. How can I fix this?

    youtube app and via Safari is refusing to work On my iPad air . Constantly getting a playback error......tap to retry. I've deleted it and reinstalled it, forced it to close down, turned ipad off but nothing has worked. however it's working perfectly on my iPhone 5!!!
    is there anything I have done wrong or a way to fix it?
    thankyou

    Update to iOS 7.1.1. Then bring it to an Apple Store if it isn't fixed.

  • Upload files from my app works fine in JDev but NOT on app server???

    i guys,
    I'm using jdeve 10.1.2. and adf bc's. So here's my problem:
    In my application i need to allow for the upload of files from user's computers. This works perfectly fine from jdeveloper but when i deploy my application on the application server i get the following error:
    JBO-26041: Failed to post data to database during "Insert": SQL Statement "D:\TrademarkTestData\TrademarkunitTestData.xls (The system cannot find the path specified)".
    D:\TrademarkTestData\TrademarkunitTestData.xls (The system cannot find the path specified)
    For some reason the system cannot find the path. This is most frustrating as it works perfectly fine when run from jdeveloper.
    Any ideas would be most welcome.
    Thanks in advance,
    Newbe

    Hi Frank,
    Thanks for the response. I've consulted with our server guy and he says that there are no read/write privileges. Jdev is not on the server.
    I'm really stumped by this so if you have any ideas, I'd really appreciate it.
    Happr New Year to you,
    Newbe.

Maybe you are looking for

  • While doing MIRO, i am getting error:-Tax code V0 country IN does not exist

    hi frds, while doing miro. i am getting this error:- pls correct me Tax code V0 country IN does not exist in procedure TAXINN Message no. FF713 Diagnosis You entered a tax code which is not defined for the country of the company code to be posted to

  • How do I import photos from Sony T900 to iPhoto?? Please help :)

    I have a Sony T900 and I have no clue how to import the photos into iPhoto. Does anyone have a clue?? Please share I really need some help =/ Thanks!!

  • How to upgrade from OS 10.5.8 to 10.7.0?

    I run a Mac Book Intel core duo with OS 10.5.8   I would like to upgrade to Lion or Mountain Lion.  How should I proceed?

  • Preloader and AmfPHP

    I knew there was something wrong and i found it now i need to fix it. What it is, is when after my preloader finishes loading large images and the messageboard, i get the images no problem (shgows the preloader works) but the messageboraddoes not wor

  • Tamaño PDF

    Todos mis archivos PDF, incluso los que obtengo por scaneo, se guardan a 1600% de tamaño. No entiendo el porqué, y además, si los reduzco al 100% y los guardo, al abrirlos nuevamente se muestran ampliados al 1600%. Alguien podría ayudarme a resolver