As is showed in the figure above, the MusicPlayerServicerun in background returns all play status to theMusicMainActivity run in foreground by broadcast (useintent as carrier). A BroadcastReceiver has registered in MuxicMainActivity to receive all broadcast from MusicPlayerService. The received broadcast will be resolved by MusicMainActivity. According to the broadcast content, the MusicMainActivity will do some actions (show users the play status ). After the music player launched, the MusicMainActivity will send messages to MusicInfoManager for the information of music files and the MusicInfoManager will activate a ContentProvider that
provided by system, then get the music files list and return it to the MusicMainActivity