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

Calling reset on Media Player after calling setDataSource, Freezes UI

user3847
1#
user3847 Published in September 20, 2018, 12:45 pm

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

share|improve this question

1 Answer 1

active oldest votes
up vote 0 down vote
You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO