Music Resource

A sound or music to embed in the application (.mp3, .wma, .mid, .wav).

XML file saved at:

res/
  music/
    music_file.mp3
    music_file1.wav
    music_file2.wma
    music_file3.ott

Resource reference

  • XML: @music/music_file
  • Java: Res.music.music_file

Example

XML file saved at res/music/myMusic.mp3.

This application code retrieves a string:

Sound mySound = ResManager.getSound(Res.music.myMusic);