Skip to main content
Known Participant
December 13, 2011
Question

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

  • December 13, 2011
  • 25 replies
  • 6279 views

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

This topic has been closed for replies.

25 replies

Kalvyn Rasquinha
Community Manager
Community Manager
July 17, 2012

Discussed this with bernard.h in a private message. The fix should be available in the next version of AIR 3.4.

Participating Frequently
July 19, 2012

Just to confirm, the Air 3.4 Beta release available from Labs doesn't contain this fix? I'm using Air 3.4.0.2200 Beta Build at the moment and am experiencing issues closing the netstream as well.

Kalvyn Rasquinha
Community Manager
Community Manager
July 19, 2012

That's correct. AIR 3.4.0.2200 does not contain the fix. The next version of AIR 3.4 (3.4.0.xxxx) will have the fix.

Kalvyn Rasquinha
Community Manager
Community Manager
July 17, 2012

This will be fixed in an upcoming AIR 3.4 release (submitted the fix today).

bernard_hAuthor
Known Participant
July 17, 2012

I downloaded it (air 3.4) and tested it, still not working on Android :-(

Known Participant
December 15, 2011

I actually have not yet tried on Android

chris.campbell
Legend
December 15, 2011

I think the safest bet would be to just go ahead and enter a bug so we can investigate further.

Chris

bernard_hAuthor
Known Participant
December 18, 2011
Known Participant
December 14, 2011

Bernard are you using a NetStream object? Have you tried calling dispose() on it?

bernard_hAuthor
Known Participant
December 14, 2011

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

Known Participant
December 14, 2011

Yes, I use a NetStream object in mine, but I'm also using RTMP so I have to. Seems like maybe it's trying to download the full file before it's done. Try calling close on soundPlay first maybe and forget the stream?