java - Android music player in UI thread or background -
i trying create simple android application play audio files sd card.
have problems understanding services. concrete, here questions.
- service default runs on ui thread, isn't ? if runs in separate process has thread, context, because process in system (fork of virtual machine instance)
- where should
mediaplayerclass used ? in background service or in ui thread. far bound services run on ui thread, there no sense in creating service bound , on if runs on ui thread ? in case want continue playing music in background while activity (or ui component destroyed) in case musicplayer occupy whole ui thread without ui visible user. right ? - i have found tons of tutorials how create simple audio player, few of them shows how run in separate thread directly service, others directly in service activity using
ibinderclass returns instance of service.
please explain topic. grateful help. thanks.
Comments
Post a Comment