here’s the requirement.
While in the Gym working out, they play this training program in the loudspeakers,
and every 30 min it say “Change Station”.
I cannot here this since i have my headphone music.
I i create a small Timer controlled Service that, when i start it will say “Change Station” every 30 minute.
If I have my own music on it will dim the music or stop the music in my device for a few seconds so i can here my own “Change Station”
The biggest problem for me is how to dim the music?
Look at the ‘audio focus’ feature in Android 2.2: http://developer.android.com/guide/topics/media/index.html#audiofocus
This way your app can request ‘focus’, and can indicate that other audio on the system should fully surrender focus, or should “duck” (just lower its volume and keep playing).
One problem is that you need the music app you’re interrupting to support this, more than your own “change station” app needs to.