Home Calling reset on Media Player after calling setDataSource, Freezes UI
Reply: 0

Calling reset on Media Player after calling setDataSource, Freezes UI

user531
1#
user531 Published in June 23, 2018, 4:35 am

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

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311326 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO