The Solution
When you want to get a raw, realtime image feed from the device camera in an Adobe AIR application on Android, you have to set the "renderMode" property in the app xml file to "direct" in order for it to work *at all*.The Problem
If you don't set the renderMode property as such, when you are displaying the live camera image in your AIR app, you'll see something like this:The gobbledeegook here has nothing to do with a turkey. |
As far as I can tell, I've come across this oh-so interesting behavior within a perfectly normal AIR application that I am running/developing/testing on my Android phone. These are the details on my app:
- A Flex mobile app, running with installed AIR 3.5.
- All UI layouts are in mxml.
- In the code, the Camera/Video object instances are ending up added as a child to a <mx:UIComponent />.
- My development device is a Galaxy S2 running Android 4.0.
But, Hopefully this will help someone out there!