message-passing

Communication between Activity and Service

此生再无相见时 提交于 2019-11-26 00:47:10
问题 I am trying to make my own MusicPlayer for android. Where i came to a problem is running some things in background. Main activity manages GUI and up to now all the songs are playing. I wanted to separate GUI and music playing classes. I want to put music managing part in Service and leave other things as they are now. My problem is that i can\'t organize communication between Activity and Service as lot of communication is happening between them including moving objects in both directions. I

Communication between Activity and Service

ⅰ亾dé卋堺 提交于 2019-11-25 19:01:59
I am trying to make my own MusicPlayer for android. Where i came to a problem is running some things in background. Main activity manages GUI and up to now all the songs are playing. I wanted to separate GUI and music playing classes. I want to put music managing part in Service and leave other things as they are now. My problem is that i can't organize communication between Activity and Service as lot of communication is happening between them including moving objects in both directions. I tried many techniques that I searched here on Stack Overflow but every time I had problems. I need