1

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 after some more debugging:

OK - through some Fiddler profiling I am observing that the http tunnel created to api.linkedin.com:443 when debugging inside of FlashBuilder vs inside of the Android emulator is different. Specifically, the following two lines of code create different HTTP headers: var request:OAuthRequest = new OAuthRequest("GET", requestTokenUrl, {oauth_callback:'http://www.xyz123.com'} , consumer, null); loader.load(urlRequest);

While in Flashbuilder the URLLoader seems to create the request with proper headers like Host:api.linkedin.com:443,Content-Length:0,Connection:Keep-Alive, etc..., inside the Android Emulator there is only one header Host: 216.52.242.83:443.

Why on earth would this happen?

ketan
  • 19,129
  • 42
  • 60
  • 98
t316
  • 1,149
  • 1
  • 15
  • 28
  • Without the source code - anything ;-) – Alexander Farber Dec 29 '11 at 16:14
  • 1
    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? – t316 Dec 29 '11 at 22:17
  • 1
    So far I have found that this is an IOErrorEvent #2032. It only happens in the android emulator and not when running on the desktop in debug or release mode (through Flash Builder). Any ideas what this could be? – t316 Jan 01 '12 at 18:41
  • 1
    BTW - for anybody wondering how to make the Android Emulator work through a proxy profiler like Fiddler - just start the emulator with the following params: emulator -avd Android4.0 -http-proxy http://localhost:8888, where Android4.0 is the name of the device profile you created. Hope this helps someone... – t316 Jan 02 '12 at 14:16

0 Answers0