File Extensions

The extension is removed, so files with the same base name but different extensions will cause issues. You wouldn't want to put a file named goodmorningandroid.mp3 and another file named goodmorningandroid.m4a in there. Instead, if you would like to provide the same audio in multiple formats, it would be better if you included the format as part of the file name so that you can differentiate between them and the Android Developer Tools doesn't have problems generating the resource ID. If you name them goodmorningandroid_mp3.mp3 and goodmorningandroid_m4a.m4a, you will be able to reference them as R.raw.goodmorningandroid_mp3 and R.raw.goodmorningandroid_m4a respectively.

Was this article helpful?

0 0

Post a comment