O'Reilly logo

Hello, Android, 4th Edition by Ed Burnette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Sound of Music

It was a dark and stormy night…. There goes the starting shot, and they’re off…. The crowd goes wild as State sinks a three-pointer with one second remaining….

Audio cues permeate the environment and set the tempo for our emotions. Think of sound as another way to get into your user’s head. Just like you use graphics on the display to convey some information to the user, you can use audio to back that up and reinforce it.

Android supports music output through the MediaPlayer class in the android.media package.[47] Let’s try it by adding some background music to the opening scene in the Tic-Tac-Toe game.

First we need some music. You can use whatever you like, but a great place to find audio is a site called freesound.org. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required