Home > Mobile >  Background music problem
Background music problem

Time:09-30

Novice, doing a little game, how to implement different games page background music is synchronous? Music is every page has a button control switch, open all pages will play background music, shut down all page stop play background music, played the game should be able to understand what I mean? Checked a day could not find this aspect of the tutorial, please spread the

CodePudding user response:

Music in the background is shown on the Service, the other pages, close to the Service to send a message to tell he play or close the music

CodePudding user response:

This line of thought, can understand, but the implementation is not clear to

CodePudding user response:

The
references between refers to seize the day on the second floor response:
this line of thought, can understand, but the specific implementation don't quite understand

Service play concerts, other page when you click the play or close send notification to the Service (interface callback or EventBus implementation), Service notified control music playback, stop
  • Related