January 2017
Beginner to intermediate
624 pages
22h 42m
English
Technically, you could have used resources in this chapter instead of assets. Resources can store sounds. Stash a file like 79_long_scream.wav in res/raw, and you can get at it with the ID R.raw.79_long_scream. With sounds stored as resources, you can do all the usual resource things, like having different sounds for different orientations, languages, versions of Android, and so on.
So why did we choose assets? The biggest reason is that BeatBox has a lot of sounds: more than 20 different files. Dealing with them all one by one in the resources system would have been cumbersome. Resources do not let you ship out all your sounds in one folder, nor do they allow you to give your resources ...
Read now
Unlock full access