In Android, I am making a simple game. This game is basically comprised of minigames. Each minigame, I have created as an activity. Let's call them ActivityA ActivityB and ActivityC.
I would like to "broadcast" (I use that term very loosely) on completion of any of these activities. When the user beats the minigame, a 1 is "broadcasted", and when they lose, maybe a -1.
I need something to listen for these "broadcasts" and keep track of the score so I know when to end the game.
What's the best way of keeping track of these, where should I start? Personally, I was hoping there would be an invisible activity (or maybe a service) between the main menu, and the game screen, that would do all of the controlling (counting score, telling the app which activities to start, etc).