'Can I put a variable into openFD()?

I have some audios in my assets and I want to play them randomly. For that I would like to use a String variable like openFD("variable").

 AssetFileDescriptor descriptor = getAssets().openFd("variable");

Is that possible to put that variable into the openFD() method? Maybe there is antoher way to do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source