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 the Chapter 28 folder. Copy the entire assets folder and 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 Android Programming for Beginners - 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.