Im working on a Music Player app, and all the music handled by the app are from streaming resources.
Everytime the user changes songs, i need to call reset and set a new dataSource. If the user rapidly switches songs, and the MediaPlayer is on the preparing state, the UI from my app freezes.
This only happens if i call reset and the media player is in the preparing state.
How can i prevent my app UI from freezing and getting an ANR?
PS: Im using prepareAsync(), not prepare().