AIR for Android: Streaming audio data won't stop unless I quit....

I write an application (AIR-Android with Flash Builder) which can play internet radio stations (streamed audio in mp3).
When I want to stop the stream like myChannel.stop() / mySound.close(); the sound is stopping but the stream is still loading (I can see it with a network monitor app).
Streaming audio data won't stop unless I quit the application or I switch my connection from WIFI to 3G or from 3G to WIFI.
I do not have this problem with Air for Mac and IOS.
How can I solve this problem ?
Bernard

Hi Chris,
I received a response from a certain Wang Zhe (from Adobe) about this bug.
https://bugbase.adobe.com/index.cfm?event=bug&id=3070987
It should provide an example of his test that apparently it worked but I have still no answer from him.
Is it possible to contact him directly?

Similar Messages

  • Streaming audio data won't stop unless I turn off the phone for 5 minutes.

    I have been testing the Curve 8330 regarding streaming audio from an icecast server. The address of the station is http://www.AirProgressive.org, click on "listen". (I have already run this by the icecast experts and they say it is a Blackberry "bug")
    BLACKBERRY USERS! PLEASE BE AWARE THAT THE STREAM (dataflow) DOES NOT STOP WHEN YOU CLICK "STOP" ON THE MEDIA PLAYER! (and will continue for as long as you leave it on, and even if you turn off your BB for less than 5 Minutes.) I'm not sure if you are charged for these streams, but it seems that the battery is depleted rapidly if this continues without aborting it. See details of my testing below:
    > Access icecast stream by clicking on the link on the website:
         http://www.airprogressive.org:8000/stream.m3u
    > Stream consists of mp3 at 32kbps / 22050 Hz.
    > Stock media player launches, stops at "Do you want to open or save the item."
        > No connections started yet (viewing "List Clients" page of icecast admin interface).
    > Click "open", stream begins playing.
    > Two connections are started instead of just one, always offset by 2 seconds.
        -- but sometimes only one connection starts.
    > FYI, Icecast config: <client-timeout>30</client-timeout>
    Here is the output from the "List Clients" page of Icecast2 Admin
    IP
    Seconds Connected
    User Agent
    Action
    68.7.238.55
    406
    WinampMPEG/5.62, Ultravox/2.1
    Kick
    74.82.68.16
    6
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.16
    4
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    Note the last two entries with the same IP address. This is the Blackberry. Top entry is winamp player on PC for reference. Don't know why two listener connections are generated.
    > Stream is "Stopped" (i.e. click stop)
    > Stream is restarted (i.e. click Play)
    > A new connection is started, this time with a new +1 IP address.
    IP
    Seconds Connected
    User Agent
    Action
    68.7.238.55
    687
    WinampMPEG/5.62, Ultravox/2.1
    Kick
    74.82.68.16
    287
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.16
    285
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.17
    8
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    I can understand that the player may continue to communicate when "stopped" to fill the lookahead buffer, but when it is restarted, it should use the same connection and not start a new one.
    > Click Stop.
    > Click Play.
    IP
    Seconds Connected
    User Agent
    Action
    68.7.238.55
    803
    WinampMPEG/5.62, Ultravox/2.1
    Kick
    74.82.68.16
    403
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.16
    401
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.17
    124
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.18
    24
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    > Yet another connection is started with a new "listener".
    > Click "back" to exit from browser in Blackberry.
    > All threads continue.
        --> I have tested this many times and the threads continue without being cleaned up indefinitely, even though the player is stopped and the stream is not "playing" on the handset.
    > Turn off mobile network. Handset not communicating.
    > Threads continue
    > Handheld turned off.
    IP
    Seconds Connected
    User Agent
    Action
    68.7.238.55
    995
    WinampMPEG/5.62, Ultravox/2.1
    Kick
    74.82.68.16
    595
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.16
    593
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.17
    316
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    74.82.68.18
    216
    Mozilla/4.8 [en] (Windows NT 5.0; U)
    Kick
    Finally, after over 300 seconds, the threads are finally cleaned up.
    IP
    Seconds Connected
    User Agent
    Action
    68.7.238.55
    1139
    WinampMPEG/5.62, Ultravox/2.1
    Kick
    So, to stop the streaming server from communicating with the Blackberry handset, you must either turn it off or disable mobile network for at least 5 minutes.
    It appears that the handset continues to transfer data (and therefore incur charges, if the user does not have an unlimited data plan) if the handset is not turned off or mobile network disabled for at least five minutes. It also runs down the battery much faster because the radio transmitter is actively being used, even if the user is not listening to the stream.
    The Blackberry network has intervening servers that continue to receive data from the streaming server even if the handset is off. This behavior likely has utility to deal with the realities of the cellphone network, to allow the stream to be transferred from one cell to another, and deal with the possibility that the handset may be out of range for up to 5 minutes without "interruption." However, it is hard to turn off the stream.
    QUESTIONS:
    1. Is there a way to stop this sort of behavior using a configuration setting or something? It seems particularly stupid to start a new stream connection each time a STOP/START cycle is completed, allowing the old connections to continue streaming data (even if the data does not make it to the handset).
    2. IS IT TRUE that the user will be "charged" for the data streams that are not disconnected?
    3. Is there a way for a developer to send a signal to the intervening cellphone network to discontinue the orphan streams?
    THANKS!!

    No, I'm using something like this :
    to start...
                       channel = new SoundChannel();
                                            soundPlay = new Sound();
                                            urlReq=new URLRequest;
                                            urlReq.url=mylUrl;  // url of radio mp3
                                            soundPlay.load(urlReq);
                       channel = soundPlay.play();
    to stop it...
                          channel.stop();
                          channel=null;
                          try{soundPlay.close();} catch (e:Error) {} // error or not, the sream won't stop.
    Any idea ? Did you try with a NetStream object ?
    Bernard

  • 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

  • Partial wakelock in Adobe Air for Android

    I'm developing Adobe Air (for Android) application which is intended to be constantly on. App has event based operations. However, when phone enters to sleep mode app is able to perform only one or few events in a second which is not good enough. AIR's SystemIdleMode.KEEP_AWAKE -mode is not an alternative since it is too battery consuming.
    I'm looking for a solution where phone is allowed to go into sleep mode (screen is off) but still CPU performance is not drastically dropped. Not sure if Android's partial wakelock -mode does the job and is available via ANE?

    Well Im a bit puzzled now. I just created a quick AIR app using AIR13 for Android and did a DEACTIVATE test on the NativeApplication.nativeApplication property and used a TextField to "trace" out the frame rate when the app deactivated. The frame rate stayed at 24FPS the entire time. I turned the screen off, let it turn off, went to the home screen, and switched to other apps while the test app was still running. In all cases, the frame rate never dropped to 4FPS as indicated in Adobe's documentation. So it is either something a bug or feature of AIR13+ or it is how Android KitKat handles applications in the background. Im using an unlocked/stock Moto X running Android 4.4.3. The app also appends the getTimer() call to the end so you can see that it does change. Here is a link to the quick app I created: Dropbox - deactivate.apk
    I guess if you want to download that and test it out to see how it behaves on your device and let me know the results. What device and OS are you running?
    Below is the original message I started to type before I decided to create a quick app to test with. It may or may not still be relevant based on your results from my app test.
    If you are looking at just recording information, you could probably setup something on the Android/Java side that gets started when the app "sleeps" using the DEACTIVE event as a trigger to start the ANE side of things. Then when your app "wakes", you could use the ACTIVATE event to trigger a call to the ANE to pull all the data collected in the Java side back to AIR and stop the ANE data capture since the data capture would be back to being handled by AIR.

  • Adobe AIR for Android update FAILS

    The most recent update for Adobe AIR for Android is failing on multiple users. Reading the reviews, I am having the same problem with running the update. Update runs, then stops and won't update? Why bother coming out with an update THAT WON'T LET YOU UPDATE AIR???????

    Hi,
    Could you please share the device used, OS version, kernel version and the last Adobe AIR installed in your device. Also, is this intermittent or it is failing everytime.
    Regards,
    Nimit

  • 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()

  • 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);

  • 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

  • Can't package AIR for Android in Flash Pro CS6?

    I have trouble pakaging AIR for Android in Flash Professional CS6.
    It worked couple months ago. Buit it won't wok now.
    Here is the error dialog box:
    Can anyone help me?

    What exactly happens when you try to debug?
    When you run 'adb devices' on a command line you see your devices listed there correct?
    One thing that helps is to use the generic Google USB driver or at least have it handy. Download the Android SDK and it's in the SDK Manager. Here's where you'd find it (AndroidSDK\SDK Manager.exe):
    Note the selected "Google USB Driver" in the "Extras" rolldown. Grab it.
    Often when a device is too new or just can't connect, that driver will find it. Also keep that SDK up to the latest version and check the adb that comes with it to make sure it sees your device:
    If Flash can't see it, there was one old trick of copying over the updated Android SDK's adb over to Flash. I believe you copied over adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll (and at the time aapt.exe) and overwrote your copy in your FLASH\AIR\lib\android\bin folder, then suddenly flash could find the devices.

  • AIR for android Sensors

    Hi all,
    I am developing in AS3 AIR for Android in the flash cs5 IDE.
    I want to develop an app that on click logs the users lat, lon, elevation, angle, and direction the phone's camera is pointing.
    I know that the there are accelerometer and geolocation sensors in flash.sensors, but i am unclear as to if the accelerometer and geolocation can give me all the data i need.  I know i can the lat and lon with geolocation.. i don't know how ever really how to interpret the data of the accelerometer, let alone how to determine the direction (n,e,w,s etc..) of the phone..
    also, i am not sure i am running the most up to date AIR for Android extension but my extension manager doesn't seem to prompt me for an update..
    Erik

    Well Accx,y and z all give accelration in x, y and z direction.
    Imagine an AIR application opened with stage in portrait mode. Now imagine
    X axis running from bottom left corner to bottom right corner,
    Y axis running from bottom left corner to top left corner and
    Z axis coming out from the face of the device.
    When a device is lying flat on a table on its back z axis is pointing up and is under gravitational accelration of 1 g(9.8 m/s2) downwards. So you can imagine an acceration of 1 g upwards to make that device lie stable on the table.
    When a device is under free fall, all three values will be 0.
    When device is in upright position with its face poiting your front, accY would be 1 and accX, accZ would be 0.
    I hope this helps in understanding the different values in other scenarios. Its just the aceeraltion in a specific direction. As a side note, accelrometer values would not give the direction the device's face is pointing to. For example in the last case above, if you rotate the device about its Y axis, all values would remain same, but the face is still pointing to different directions.
    Thanks,
    Meet

  • How to add Google Ads or similar in "AIR for Android" application?

    Hello,
    I have developed my android application (AIR for Android) in Flash Professional CS5.5. It's completed and fully tested on multiple android phones. Now I want to add Google Ads in my application to make some money.
    What I already know:
    I know that Adobe provides AdMob native extension API which allows you to add Google Ads in your app. But unfortunately, it's not free.
    What I want:
    I want a free resource through which I can add ads in my application.
    Please guide me how can I achieve this?
    Thanks in advance,
    momersaleem

    Yes, its for me broken, too.
    I found the link in this thread:
    http://forums.adobe.com/message/4036804
    Maybe try to contact the author or one of the thread participants for an unbroken version?

  • Air For Android - Full Screen not working

    Opened CS5.5 > Chose "Air For Android" which gave me a stage dimension of 480x800 default. I then created my app.
    I am using a Droid Bionic and testing my app on it. It will not go to full screen, regardless of how I am holding the Droid. When publishing, I clicked "Full Screen" and Portrait, Landscape, Auto Orientation, etc. I tried all of the publishing options, yet still there is white screen on the eastern and southern side of the screen.
    I have a picture on the main screen, and it fits perfectly within the 480x800 dimmensions when playing in Flash. After publishing to an APK file and testing it on Droid, I have that white space as mentioned, as if the stage size grew larger than the picture / app. I also shrank the stage(480x800) dimensions to to (340x600) , but still the same amount of white space. When I move the picture to the right a bit, and publish, it shows the white space on the left hand side of the stage. This can only mean that when I publish, the stage size grows but everything on the stage stays the same. 
    Any ideas?
    Thanks!

    I removed:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    from AS3 and it works better. Now there is even white space on the north and south side of the screen. Clicking "Full Screen" in the publish settings, makes a little more white space, which is weird. It as if now the stage is expanding its height, rather than its height and width due to me using the above code. Still, would like to get rid of that extra white space.
    Edit: It looks like the stage height grew by 60. If I expand the picture by 60, placing it on the stage at 0x and -30y, it fits fine on the bionic. I don't understand why this is happening, and scared that it may be different for each device.

  • APP created with Air for Android but doesn't work on the emulator for test - Help!

    When I create an application using Flash CS5.5>>> AIR FOR ANDROID.
    After creating a test page I go to publish settings and send the app on Emulator RELEASE ... The APP is loaded correctly but as soon as you start the emulator, give this error "The application XXnameappXX (process air.XXnameappXX) has stopped unexpectedly. Please try again" Help Please!

    Ok i've find this before "Adobe Flash CS5/AIK2.5/runtimes/air/android/emulator/Runtime.apk" and install it on android emulator! Now works all i hope! Thanks for your answer!

  • Best practice for images. Air for Android

    Hey guys...
    I was thinking about the best solution when it comes to images storage for Air on Android.
    Since I dont have much experience with non-web based apps, I thought of two way and I would like to know your thought on them.
    1.Application Storage Directory. If I get it right, this folder is created when the app is installed and the project can access files in it. Any idea on how this can work with images?
    2.Database. My app uses a local database anyway so maybe that the proper way to do it. I've done some research and found out that the image must be converted to a byte array (thats easy) but then I dont have a clue on how to save it to the database.
    So? Which one is better for the mobile world?
    Also, if there are other ways let me know please.

    While I am no expert in this area, I did run across this blog:
    http://www.remotesynthesis.com/post.cfm/local-caching-of-remote-images-in-air-for-android
    It deal with local caching of remotely loaded images.  Should be exactly what you are looking for.
    Darren

Maybe you are looking for

  • Chinese character display

    Whenever I download a file with Chinese characters the filename only displays "????". How can I get the filename to display properly?

  • User friendly way to let user pick a report?

    I have a table that stores report names, the user that generated the report and report date. What is the best method for displaying a list of available reports and letting the user select one for viewing? Would it be an LOV? Darren

  • Person responsible in marketing projects

    Hello Sap Guys, I have a question about the Person Responsible in Marketing Projects. Is it just the responsible for being the person in charge for the creation of the project? or is it the responsible for approving it (workflow for approval)? If it

  • NAC agent 4.9 and WES7

    I am trying to find a support matirx for Windows client support in 4.9 I see where the newest release supports WIndows 8 and IE10. I do not see support for Windows embedded. Is this supported?                  

  • Can't calibrate new nike+ sensor

    I just bought a new nike+ sensor and need to calibrate it. At the end of my work out, when I hit "end workout" the "calibrate run" button should show up, instead it freezes and my workout goes right into "history" and I can't calibrate it. Super anno