katzvelraj / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

FC if you try to start a stream while another is preparing #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start the app when it's not already running in the background
2. Select Station Search
3. Search for WAMU
4. Click the first stream in the list
5. Immediately click the stream again

What is the expected output? 
Should prepare, buffer and start playing the stream

What do you see instead?
Error message with Force Close button

Please use labels and text to provide additional information.

This happens because the player is in the process of preparing and we try to 
set the datasource again without reseting it. We explicitly do not reset the 
player because doing so can cause an FC on Droid X if the player has not had 
play() called. However, a possible FC in this case on Droid X is probably lower 
pain than having a guaranteed FC on all devices.

It would also help to ignore "play" requests in the PlaybackService for an item 
that is currently playing.

Also, when playing streams and podcasts they should start the spinner and 
update the player display immediately rather than have it wait for the update 
notification from the PlaybackService which can take up to a minute to prepare 
on slower networks.

Original issue reported on code.google.com by jeremy.w...@gmail.com on 23 Mar 2011 at 6:29

GoogleCodeExporter commented 9 years ago
Fixed in build #202. 

This adds immediate notification when starting a stream or podcast or hourly 
news so that should reduce people hitting the same stream multiple times trying 
to get it to feel like it's doing something. 

Also removes the possibility of FC for all devices when starting one playable 
when another is preparing, except in the case of the Droid X where, 
anecdotally, this may cause FC or even hang.

Original comment by jeremy.w...@gmail.com on 24 Mar 2011 at 6:03