Add the sound to the project

Before we get to the code let's add the sound files to the project. You can find all the files in the assets folder inside of the Chapter 17 folder. Copy the entire assets folder then using your operating system's file browser go to the Snake/app/src/main folder of the project and paste the folder along with all the files. The sound effects are now ready for use.

Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.