How to send data from service to activity?

前端 未结 1 1791
心在旅途
心在旅途 2021-01-25 00:06

I\'m beginner in Android development. I try to create kind of MusicPlayer, which uses Service for playing music. When I click buttons in MainActivity, I call startService with I

相关标签:
1条回答
  • 2021-01-25 00:35

    Use a messenger to send the Message from the Service on onHandleIntent() method, then Recieve it with A handler...see this tutorial http://www.vogella.com/articles/AndroidServices/article.html

    0 讨论(0)
提交回复
热议问题