AIR for Android video issue

On Android, in an app that I’ve developed successfully for iOS, I’m seeing this problem:
There are 5 videos built-into the app. On Samsung phones (S3 and S4), running Android 4.4.2, at the first attempt to play a video there’s sound but no picture. After returning to the video menu and attempting again, video and sound play normally. If a video is stopped and another one is started, initially a frame of the previous video is displayed (for a fraction of a second), then play resumes normally with the chosen video.
The sound-but-no-video problem does NOT show up on a Nexus 7 running 4.4.3, although the flash-frame problem does.
I’m publishing with AIR SDK 15 packaging both with and without captive runtime to try to isolate the source of the problem. I’m using <contains video> true </contains video> in the descriptor.
This feels like AIR-for-Android buggishness. Any confirmation out there? Similar problems? Workarounds?
I’ve read somewhere that AIR runtime  v.3.3 may solve some video problems on Android, but not sure where to find an archived Android version of AIR that old.

Well, as it sometimes happens with me, I have spoken too soon. The answer that I marked as ‘correct’ the other day (Colin, are you there?), seems to be not quite the right answer. At least, it doesn’t solve the video problem that I’m having with some, but not all, Android devices.
After trying Colin’s suggestion – using  if (stage.stageVideos.length != 0) to make sure that a stageVideoAvailabilityEvent hasn’t already fired when I try to play my first StageVideo instance – and getting perfect results in 10 consecutive tries on my Samsung S4 and S3 phones, I figured that was IT.
Next day, same devices and same code, it DIDN’T work! I pulled hair, issued profanities, hammered on the table. It didn’t matter—I still got a ‘mis-fire’ on the first play of a video whenever (almost whenever) I opened the app. After the first play everything was good – which is the exact problem that I started with many days ago. When I played Colin’s Sesame Street ‘Let’s Get Ready’ app again – the same first-play-of-video problem shows up there too.
This problem does not show up on Nexus 7  and the Samsung Galaxy 5 Tab. It is a royal p.i.t.a. on Samsung phones, where I need my app to work.
I created a bare-bones app to reproduce the problem, code below. Just a single class to play a single video with no controls. A few parameters (path to the video, and viewport stuff) are passed in from the document Class. I run it 10 times on my S4. It fails 7 times and plays well 3 times. The 'initialize2()' function never fires, proving that the stageVideos array already exists by the the time the 'initialize1()' function is called.
I'm pretty sure that this is not a coding problem (because it works well on some Androids and in iOS), but WHAT is it??
package vidTestSource
  import flash.desktop.NativeApplication;
  import flash.desktop.SystemIdleMode;
  import flash.display.MovieClip;
  import flash.display.Sprite;
  import flash.display.StageAlign;
  import flash.display.StageScaleMode;
  import flash.events.Event;
  import flash.events.NetStatusEvent;
  import flash.events.StageVideoAvailabilityEvent;
  import flash.geom.Rectangle;
  import flash.media.StageVideo;
  import flash.media.Video;
  import flash.media.StageVideoAvailability;
  import flash.net.NetConnection;
  import flash.net.NetStream;
  public class MobileVideosolo extends MovieClip
      public var stream:NetStream ;
      public var video:StageVideo;
      var xx:Number;
      var yy:Number;
      var ww:Number;
      var hh:Number;
      var mymoov:String;
  public function MobileVideosolo(mymoov,xx,yy,ww,hh)
      this.xx = xx;
      this.yy = yy;
      this.ww = ww;
      this.hh = hh;
      this.mymoov = mymoov;
     addEventListener(Event.ADDED_TO_STAGE, onstage);
function onstage(e)
    if (stage.stageVideos.length != 0)
       initialize1();
     else
      stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, stageVideoState );
function stageVideoState(e)
       initialize2();
       stage.removeEventListener (StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, stageVideoState);
function initialize1()
      var nc:NetConnection = new NetConnection() ;
      nc.connect(null) ;
      stream = new NetStream(nc) ;
      stream.client = this ;
      video = stage.stageVideos[0] ;
      video.viewPort = new Rectangle(xx,yy,ww,hh) ;
      video.attachNetStream(stream) ;
      stream.play (mymoov) ;
      MovieClip(parent).sVtext.text = "Init 1";
      stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
function initialize2()
    var nc:NetConnection = new NetConnection() ;
     nc.connect(null) ;
     stream = new NetStream(nc) ;
     stream.client = this ;
     video = stage.stageVideos[0] ;
     video.viewPort = new Rectangle(xx,yy,ww,hh) ;
     video.attachNetStream(stream) ;
     stream.play (mymoov) ;
     MovieClip(parent).sVtext.text = "Init 2";
     stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

Similar Messages

  • Air for Android video object displays on orientation change

    I have an Android app that plays a video using the normal video object, ie:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    stream = new NetStream(nc);
    stream.client = this ;
    stream.addEventListener(NetStatusEvent.NET_STATUS, statusHandlerx);
    softwareVideo = new Video(640, 480);
    softwareVideo.x = 0;
    softwareVideo.y = 0;
    addChild(softwareVideo);
    When the video is playing if there is an orientation change, before the screen adjusts,  you can see a full screen version of the video behind the 640x480 in the area of the screen that adjusted yet.  So if the video is in portrait and the orientation is switched to landscape, in the right befow the stage adjusts to landcape you can see the right part of a fullscreen version of the video.
    Also when I remove the video object you can still see the last frame of the video in that area.
    HELP.  Is this a bug?

    Hi,
    Please log a bug at bugbase.adobe.com with a sample app(sources,swf,app-xml and assets) with which bug can be reproduced at our end. Also please mention the devices with OS version and the AIR build version on which bug is reproducible. A video demonstarting the bug would be really helpful for us.
    Also please mention the bug number here on forum so that we can look into this issue.
    -Nimisha

  • AIR for Android App - Video Issue

    Hi all,
    I've developed a Air for Android application targeted specifically for Samsung N 800.
    There is a section in the application that has a list of Thumbnails and the user can click on any thumbnail and Play appropriate video.
    When playing the video, there is a Close button and Next / Back buttons available on the screen to handle respective actions.
    The issue with the app is that, when the Video is playing, if I hit the Home button available on the Tablet, the app minimises. Now if I maximize the app from the System Tray or reopen the App from the Menu, the video continues to play, but this time the Video overlaps the Close and Next / Back, so the user is not able to close the video what so ever.
    The same issue occurs when I access any of the buttons available on the Tablets system bar on the bottom of the screen.
    Any help will be much appreciated

    I'm not sure if I completely understand you, but if I do, you want to check the Exif info to see how the image is oriented, then rotate it to show it how you want on the screen. Take a look at this post here: http://forums.adobe.com/thread/875157 it may help with doing what you need. It's a little tricky and works differently for iOS and Android, but not too hard to figure out. Also, in the future, you may have more luck getting some decent answers by posting in this forum: http://forums.adobe.com/community/air/development/mobile?view=discussions

  • Adobe AIR for Android - GPU Mode - Bitmap Auto-Smoothing Issue

    Hi everyone
    I'm having a bit of an issue with the AS3 bitmap object. I'm currently developing an 8-bit style pixel game for AIR for Android.
    This game is being developed at a very low resolution and is being scaled up to maintain the charm of an old retro game.
    One of the methods I'm using is drawing pixels directly to bitmap objects and scaling the object up to create the old look.
    When testing on a mobile device, this works beautifully when you set the rendering method to Direct but when you change
    the render method to GPU the visuals go all blurry and anti-aliased (it's as if the bitmap is being smoothed out). The mini map
    for example is rendered using the setPixel method and then scaled up 9 times. Looks great on my PC but once I export it to my phone
    it looks absolutely awful! This is no good as I want to keep the clean, solid pixel look to maintain the the old 8-bit feel and obviously
    I'd like to stick to GPU mode due to it's speed.
    Like I said, this only happens once you test on a mobile device in GPU mode - it doesn't do it on my main desktop machine or
    in Direct mode. I already have the stage quality set to low and I've tried setting the bitmap's smoothing property to false but
    it does nothing.
    Does anyone have any suggestions as to how I can get around this?

    How about first blit your image to a small bitmapData, then draw it on a large bitmapData (9X larger)?
    Like,
    var small_bmd:BitmapData = new BitmapData(SMALL_WIDTH, SMALL_HEIGHT, false);
    var large_bmd:BitmapData = new BitmapData(SMALL_WIDTH * 9, SMALL_HEIGHT * 9, false);
    var bm:Bitmap = new Bitmap(large_bmd, PixelSnapping.NEVER, false);
    var blitRect:Rectangle = new Rectangle(0, 0, 9, 9);
    var i:uint, j:uint, blitColor:uint;
    small_bmd.draw(SOURCE_IMAGE);
    large_bmd.lock();
    for(j = 0; j < SMALL_HEIGHT; j++){
         for(i = 0; i < SMALL_WIDTH; i++){
              blitColor = small_bmd.getPixel(i, j);
              blitRect.x = i * 9;
              blitRect.y = j * 9;
              large_bmd.fillRect(blitRect, blitColor);
    large_bmd.unlock();
    Not sure if the code works or not, but hopefully this helps.

  • AIR for Android - best video specs?

    Hello everyone,
    I'm trying to develop a custom video player app using the AIR for Android extension in Flash Pro CS5.
    I tried out an FLV and an MP4 video with the most stripped back code snippet, but the video still seemed a bit jerky on my phone. (Samsung Galaxy S)
    // Code
    var video:Video;
    var connect_nc:NetConnection = new NetConnection();
    connect_nc.connect(null);
    var stream_ns:NetStream = new NetStream(connect_nc);
    stream_ns.client = this;
    video = new Video();
    addChild(video);
    video.attachNetStream(stream_ns);
    stream_ns.play("video.flv");
    Would anyone know what the ideal encoding specs are for non-jerky video? Is it something to do with H.264, or perhaps CPU vs GPU? (I tried that too, with no visible difference.) Even with the app running at the appropriate frames per second (in this case, 24fps), the video seemed less than smooth.
    Any comments would be much appreciated!

    Hi [email protected]
    These should help you:
    http://www.adobe.com/devnet/devices/articles/encoding-guidelines-android.html
    http://www.adobe.com/devnet/devices/articles/video-player-optimization.html
    regards Mike

  • Issue with Amazon and AIR for Android

    It appears that Flash Pro CS5.5 does not create .apks properly for the Amazon Appstore. The airDownloadURL is incorrect according to Amazon and your app will likely be rejected if you try to submit it to them. In the AIR for Android Settings, when you choose "Get AIR runtime from: Amazon Appstore" in the Deployment tab, the link Flash Pro uses for the airDownloadURL property is:
    http://www.amazon.com/gp/mas/dl/android/com.adobe.air
    when it should be this:
    http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air
    As far as I can tell, there is no way to edit this within Flash CS5.5 so Adobe needs to make the change in a future update. The only way I know of around this is to create your .apk manually through the command line using the AIR SDK. It should look something like this:
    adt -package -target apk -airDownloadURL http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air -storetype pkcs12 -keystore certificate.p12 filename.apk filename-app.xml filename.swf icon36.png icon48.png icon72.png
    If you don't have any experience using the AIR SDK then do some searching online. There are a ton of good resources out there.
    Good luck!
    tomdei

    For me works editing of Markets.xml file at:
    "C:\Program Files\Adobe\Adobe Flash CS5.5\en_US\Configuration\Android\Markets.xml"
    and replacing of Amazon Appstore key to
    <market name="Amazon Appstore" url="http://www.amazon.com/gp/mas/dl/android?p=com.adobe.air"/>
    That's all!

  • How can I use a file in flash cs6 that I made in flash cs5.5 air for android

    I have made an app in in air for android in flash cs5.5 air for android, and I want to edit it in cs6 and play it in cs6.
    But if I put Ctrl+Enter I got an error: createWin process failed with error 2: system couldn't find the file. I think the problem is that I'am using air for android 2.6 version in flash cs5.5 and version 3.2 in flash cs6. I have searched the web and found out that you can add older air versions using the sdk manager and I have tried it but first I get the error that the version of the sdk I am trying to install is not valid and after some files that I added to the sdk folder I get this error:Only SDK higher than version 3.4.2540 may be added.
    I there a possible way to update the air for android for an fla or apk? Or how can I let my originally file work fine in flash cs6??

    system couldn't find the file
    If you can´t get a more specific hint why your project can´t compile then I can think of some reasons theis error might occur
    1.You had files included besides the swf, like videos, audio files, xml files, that are not present in the place air expects them to be
    2.somewhere in your createWin functions there is a class import needed that isn`t present in 3.2 anymore, for example some classes or functions from classes that were valid in 2.6 are not any more in 3.2
    3. to achieve better eror logging, allow for debugging in the publishing options and see what specific lines in your code throw the error
    4.any air app needs a cert file, this needs to be created once, if you migrated to e new system it might be you never created that file which air expects to even begin the compiling process
    once you isolate the problem, report back

  • AudioPlaybackMode.Voice on Air for Android

    Im developing an Air for Android App using Air 17 that is basically a VOIP phone. Im trying to get the Audio to come through the earpiece using the following code: SoundMixer.audioPlaybackMode = AudioPlaybackMode.VOICE; SoundMixer.useSpeakerphoneForVoice = false;
    It seems to work until I start talking into the built in Mic from my android device, the audio just stops functioning all together. I tested the AudioPlaybackMode.Voice on another simple app I made where it just plays a sound file and it works perfectly.
    Can anyone provide me with some insight of why this is happening or give me any advice on how to debug this issue? Thanks

    Make sure that were your tutorial code uses startDrag() /stopDrag()
    that you use: startTouchDrag()/stopTouchDrag()

  • Adobe Air for Android - caching key event that have "unusual" keycode

    I am developing an application for a platform. The OS of this platform is Android Gingerbread (2.3.4) The platform has some buttons with "unusual" key code: 141, 131 etc.
    Native application that created in ADT can catch and respond to these keyboard events While my Adobe AIR application (created in Flash professional) are Indifferent to them.
    I try both: stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyHandler,false,0,true); NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,KeyHandler,fa lse,0,true);
    How can I "catch" this event? Maybe a way to add constant to the keyboard class?
    Thanks

    If you are deploying for iPhone it is on the 'general' settings(First setting page opened).
    Just noticed you are making android app but i still added iphone deployment settings for further future
    But if you are using it for flash/android you have to add code into your fla descriptor with XML language(dont worry it is 1 line of code)
    Watch the video on this page about GPU rendering:
    http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.ht ml
    Your app shouldn't lag after these steps but if you have a project that gets bigger and has lots of code it MIGHT lag so that is when external files should help.

  • Air for Android Extremely Slow...

    Hey everybody,
    Hopefully some of you have been trying the prerelease of Air for Android like myself. Its all great and easy peasy to export the apps to my phone but it seems to be ridiculously slow even for seemingly simple scripts.
    This is what i'm trying to run at the moment and the app times out before it gets running (All the apps do get running eventually but only after the time out timer could have run over multiple times).
    import flash.display.Shape;
    import flash.events.Event;
    import flash.sensors.Accelerometer;
    import flash.events.AccelerometerEvent;
    var vx:Number = 0;
    var vy:Number = 0;
    var s:Shape = new Shape;
    s.x = stage.stageWidth/2;
    s.y = stage.stageHeight/2;
    with (s.graphics)
        lineStyle(3,0);
        drawCircle(0,0,5);
    addChild(s);
    var accel:Accelerometer = new Accelerometer();
    addEventListener(Event.ENTER_FRAME, onFrameLoop);
    accel.addEventListener(AccelerometerEvent.UPDATE, onAccelEvent);
    function onAccelEvent (evt:AccelerometerEvent):void
        vx += evt.accelerationX;
        vy += evt.accelerationY;
    function onFrameLoop (evt:Event):void
        s.x = Math.round(s.x + vx);
        s.y = Math.round(s.y + vy);
    From what I can see theres nothing actually wrong with the code from what I can see but it just takes so frickin' long to load. If I make an app with some equally simple animations it loads almost instantly. I am aware that this is only a prerelease version of the software and the documentation does say that hardware acceleration has not been added yet but whenever I watch the videos up on youtube of the Adobe team making amazing apps with obviously buckets of script running smoothly on their phone I get annoyed
    P.S The processor on my phone isn't the problem either (Nexus One Eclair )

    If you are deploying for iPhone it is on the 'general' settings(First setting page opened).
    Just noticed you are making android app but i still added iphone deployment settings for further future
    But if you are using it for flash/android you have to add code into your fla descriptor with XML language(dont worry it is 1 line of code)
    Watch the video on this page about GPU rendering:
    http://blogs.adobe.com/cantrell/archives/2010/10/gpu-rendering-in-adobe-air-for-android.ht ml
    Your app shouldn't lag after these steps but if you have a project that gets bigger and has lots of code it MIGHT lag so that is when external files should help.

  • The Error Message 'Application descriptor file cannot be parsed' shows when compiling (Ctrl + Enter) Adobe AIR for Android applications on Flash Professional CS5.5

    The Error Message 'Application descriptor file cannot be parsed' shows when compiling (Ctrl + Enter) Adobe AIR for Android applications on Flash Professional CS5.5
    This is happening for most of the pupils and staff at our school and they are unable to complete their work.
    This also happens on a fresh copy of windows and CS5.5 without any updates and also with all latest updates.
    I have tried it on 32-bit and 64-bit CS5, Windows, Air and Java with the same error every time.
    There are a small minority of users where this works fine for them with no issue.
    I have tried re-setting user profiles.
    I have tried a local admin and domain admin account with the same issue
    I have noticed however that if the file is moved to the shared area it will compile. If it is on their documents area it will not compile. The users have full control in both locations. This is fine for staff but we are unable to give full control or modify access to the shared area for the pupil's
    I have been through the online support section and it directed me to phone Adobe Customer care who informed me that all support has been discontinued for CS5, CS5.5 and CS6 and they will only support creative cloud.
    Any ideas what to try next? There is no other information about this error and I cannot work out what is causing it.

    I have tried and  able to package an apk using your XML file.Could you please make sure your XML file starting from line 1 and coloumn 0.Any space will results in the error (Application Descriptor file cannot be parsed)
    -Pranali

  • Flash cs5.5 FLVplayback Encoding Problems with Air for Android

    Dear All,
    I'm trying to play flv in my air application by using FLV playback in flash cs5.5.
    I can play flv in the pc but not on the samsung galaxy tab andriod platform.
    if anyone out there has tried out FLV playback with either an Air For Android application, where the FLV files are packaged within the app, or either streaming via normal http//:, any help  would be greatly appreciated.
    Thanks!

    First disable autoplay. It gave errors for me. Try to make the movie play with the play() command.
    to embed the movie in your air bundle, just go to publish settings for your flash project. Then in that screen go to the player settings.
    In the first GENERAL tab you'll see a the bottom that you can add files to your project
    Propably there is allready your .swf and an .xml file in there.
    Using the + icon you can add your video.
    Make sure that your video is in the same directory as your . FLA file and you can use it as is (by name)
    If for example your flashfile is in c:\mytest\mytest.fla and the video in c:\mytest\videos\myvideo.flv , then you will have to load your video as "videos/myvideo.flv" with a FORWARD slash, never use \
    Good luck

  • Air for Android language problem

    i have an Air for Android APK compiled by Flash CS5.5 that shows support for languages that are not in the app. I successfully removed these in my iOS apps, but am unable to find out how to do this for Android apps. Anyone developed a process to fix this?

    I'm still having this issue with every export. This seems to be a problem that just won't die.
    Edit: This might be the answer
    http://forums.adobe.com/message/4329360#4329360

  • Download Flash/AIR for Android, where?

    When I go to Adobe's download center I don't get an option for Android download.
    So from where exactly I can download Flash player and AIR for Android ?
    Thanks

    Adobe Flash Player and AIR for Android are available directly from the Android Market on supported Android devices.  If you are unable to find Adobe Flash Player in the Market, the most likely reason is that your device does not meet the minimum system requirements.
    Specifically, Flash Player requires a CPU with support for the ARMv7-A instruction set to achieve the level of performance required for acceptable multimedia playback.
    Your device has an ARM11 CPU, which only supports the ARMv6 instruction set.
    For future reference, Adobe maintains a list of devices certified to work with Adobe Flash Player and AIR here:
    http://www.adobe.com/flashplatform/certified_devices/
    You might want to give Skyfire a try.  It uses "remote desktop" technology to render Flash animation and video in the cloud, for devices that are incapable of processing Flash content natively:
    https://market.android.com/details?id=com.skyfire.browser&feature=search_result

  • Activation fails when not anwsering an incoming call Air for Android

    Hi,
    I'm developing a game with Adobe AIR for Android; we are handling events for Deactivate (Pausing) / Activate (just tracing for now) of the game.
    It works OK when:  I press home button and then go back. When I get an incoming call and answer it. When I get an incoming call and reject it. They all activate the game when finished
    It doesn’t work when: I get an incoming call and I missed it (no answering, no rejection either) instead of activating the game again a black screen is showed (trace on Activate event is not fired either).
    Did anyone experience the same issue?
    Regards

    I tried the above case on Samsung S4(v4.2.2)(Currently I have with me) with latest AIR SDK available at http://www.adobe.com/devnet/air/air-sdk-download.html and I am getting the activate and deactivate event if I get an incoming call and I missed it. Below is the code snippet I used. Please update if you are using something different.
    stage.addEventListener(Event.ACTIVATE,onActivate);
    stage.addEventListener(Event.DEACTIVATE, onDeactivate);
    protected function onDeactivate(event:Event):void
    // TODO Auto-generated method stub
    trace("In the deactivate method..........");
    protected function onActivate(event:Event):void
    // TODO Auto-generated method stub
    trace("In the activate method...........");
    Could you please share the 3.7 version using adt -version command on either terminal or command promt. You can find adt at AIRSDK/bin folder.
    Regards,
    Nimit

Maybe you are looking for

  • Font smoothing settings doesn't consistently work for every login on Windows 2008 R2 when using a RDP client

    I'm trying to use the MSTSC client on a Windows 8.1 machine to connect to a Windows 2008 R2 server. In the MSTSC experience tab I checked the font smoothing option. Font smoothing works some times and doesn't work the other times. I don't see a patte

  • Shipping TAB not appearing in PO for users

    Hi Friends, We are having a strange problem. We have 3 users. --> When one of them is manually creating a PO SHIPPING TAB is coming. When he is copying one PO without SHIPPING TAB to another PO then also SHIPPING TAB is coming. --> When another user

  • Pre-populate select box causing query error

    Referring to this thread http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56335#305025 I wanted to pass a value to a dynamic select box (in a url), so I changed this: <option value="'#SITEID#'" selected=#sid#> to this: <option value="#

  • Integrate forms with Java

    Hi, Is it possible to Integrate forms6i with Java Beans my requirement is to show a Java Bean using "Bean Area" component in Forms6i client/sever. If is possible please provide me with some samples Thanks, Ali

  • Trying to figure out how to get custom quiz concept to work

    OK so I've been trying to get this concept to work in CP4. I have simulation quiz questions that gives the user 2 attempts to answer the quiz. The one hitch is that if the user get the question wrong the first time it gives them an "incorrect try aga